https://kotlinlang.org logo
Title
j

Joakim Tengstrand

06/24/2020, 2:09 PM
Hi everyone! I cloned this repo https://github.com/gradle/guides.git and then I went into the folder 'guides/subprojects/building-kotlin-jvm-libraries/samples/code/my-kotlin-library' and executed "gradle publish" which is suggested at the end of the section "Push to local repository" in https://guides.gradle.org/building-kotlin-jvm-libraries/, but it doesn't work, I get: FAILURE: Build failed with an exception. * Where: Build file '/Users/tengstrand/source/guides/subprojects/building-kotlin-jvm-libraries/samples/code/my-kotlin-library/build.gradle.kts' line: 43 * What went wrong: Script compilation error:  Line 43:   from(java.sourceSets["main"].allSource)              ^ Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:                 public val Project.sourceSets: SourceSetContainer defined in org.gradle.kotlin.dsl                public val KotlinJvmProjectExtension.sourceSets: NamedDomainObjectContainer<KotlinSourceSet> defined in org.gradle.kotlin.dsl
n

no

06/25/2020, 8:24 AM
does it work if you try
./gradlew publish
?