The Wayback Machine - https://web.archive.org/web/20201205163206/https://github.com/Kotlin/kotlinx.html/issues/20
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle code on getting started page is out of date #20

Open
jmmoore opened this issue Aug 26, 2016 · 3 comments
Open

Gradle code on getting started page is out of date #20

jmmoore opened this issue Aug 26, 2016 · 3 comments
Labels

Comments

@jmmoore
Copy link

@jmmoore jmmoore commented Aug 26, 2016

Using Gradle 3.0, Kotlin 1.0.3, and the following build.gradle file, I get a compilation error:

Could not find method compileClient() for arguments [org.jetbrains.kotlinx:kotlinx.html.js:0.5.10] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

I get a different error if using "${kotlinx.html.version}" in place of the version number:

Could not get unknown property 'kotlinx' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

What I did get to work properly was calling the compile method on the js version of the library, but I doubt that the behavior is intended.

buildscript {
    ext.kotlin_version = '1.0.3'
    repositories {
       mavenCentral()
    }
    dependencies {
       classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

apply plugin: 'kotlin'

repositories {
    maven {
        url "http://dl.bintray.com/kotlinx/kotlinx"
    }
}

dependencies {
    compile "org.jetbrains.kotlinx:kotlinx.html.jvm:0.5.10"
    compileClient "org.jetbrains.kotlinx:kotlinx.html.js:0.5.10"
}
@jmmoore jmmoore changed the title Gradle repo/dependencies block is out of date Gradle code on getting started page is out of date Aug 26, 2016
@cy6erGn0m
Copy link
Member

@cy6erGn0m cy6erGn0m commented Aug 29, 2016

For sure it's not a complete gradle script, it's just a snippet. You have to put your version instead or declare your own property. Perhaps I have to make it more clear?

@jmmoore
Copy link
Author

@jmmoore jmmoore commented Aug 29, 2016

I would find some additional clarity helpful, yes, even if it's a two line addition to the top of the snippet.

//Fill this in with the version of kotlinx in use in your project
def kotlinx_html_version = [your_version_here]

I found that using kotlinx.html.version did not work properly, and so replaced the periods with underscores.

Is there something that I'm missing about gradle or kotlinx?

Any input on the compileClient method being missing? Using compile alone works without error.

@cy6erGn0m
Copy link
Member

@cy6erGn0m cy6erGn0m commented Aug 29, 2016

Let me check about compileClient. As far as I remember it was helpful to do like that when you have client and server side in the same module. Perhaps it is broken now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.