I've got a question about the Gradle Kotlin DSL. I...
# getting-started
f
I've got a question about the Gradle Kotlin DSL. I'm trying to generate a sources jar, so I'm using both this https://stackoverflow.com/questions/11474729/how-to-build-sources-jar-with-gradle and this https://github.com/gradle/kotlin-dsl/blob/master/samples/maven-publish/build.gradle.kts. However, in my build script, the tasks.registering function is not recognized, so I have switched it to creating for now. In addition, the sourceSets variable is not being recognized either and causes this error
Copy code
Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
                        public val KotlinJvmProjectExtension.sourceSets: NamedDomainObjectContainer<DefaultKotlinSourceSet> defined in org.gradle.kotlin.dsl