Hi! I am having trouble getting my project to comp...
# kontributors
s
Hi! I am having trouble getting my project to compile using the Kotlin compiler I have built from source. I have created a kotlin starter project with
gradle init --type kotlin-application
and I have added these lines (found [here](https://github.com/JetBrains/kotlin/#including-into-composite-build)) to my `settings.gradle`:
Copy code
includeBuild('/path/to/kotlin') {
    dependencySubstitution {
        substitute module('org.jetbrains.kotlin:kotlin-compiler') with project(':include:kotlin-compiler')
    }
}
When I do a
./gradlew build --info
in my starter project, I can see that the there are
:kotlin:*
tasks running (though they re-run only after I do a
./gradlew dist
in the kotlin compiler repo) but the changes I've made to the Kotlin compiler (I've added some print/logging statements) are not showing up when compiling the code in my project. Any suggestions on how I can get my project to compile with a built-from-source Kotlin compiler using Gradle?
i
./gradlew dist install publish
publishes kotlin version
1.3-SNAPSHOT
to maven local. Thus, after doing this, use
mavenLocal()
repo in buildscript and set
$kotlin_version
to
1.3-SNAPSHOT
.
👍 1
i
@Ilmir Usmanov [JB]
install
is enough for such usage.
👌 1
👍 1
⬆️ @Sam note that this way kotlin-compiler is taken from the maven local repository and you don't need to include it in composite build.
👍 1
s
Thank you both! Very helpful