gildor
09/25/2017, 9:21 AMgildor
09/25/2017, 9:22 AMCzar
09/25/2017, 2:08 PMext["kotlinVersion"] as String
worked. Ugly 😞gildor
09/25/2017, 2:21 PMplugins
block and than omit Kotlin version for other kotlin dependencies.gildor
09/25/2017, 2:25 PMmadisp
09/25/2017, 2:37 PMbuildSrc
so I get source navigation and proper completiongildor
09/25/2017, 2:39 PMmadisp
09/25/2017, 2:39 PMmadisp
09/25/2017, 2:41 PMpackage myapp.gradle;
public class Deps {
public static final String kotlinVersion = "1.1.50";
public static final String kotlinPlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:" + kotlinVersion;
public static final String kotlinRuntime = "org.jetbrains.kotlin:kotlin-stdlib-jre7:" + kotlinVersion;
}
madisp
09/25/2017, 2:42 PMbuild.gradle
file I can just do import myapp.gradle.Deps
in the beginning of the file and everywhere else Deps.kotlinPlugin
, Deps.kotlinRuntime
etcmadisp
09/25/2017, 2:42 PMmadisp
09/25/2017, 2:43 PMbuildSrc
which feels a bit iffygildor
09/25/2017, 2:44 PMCzar
09/26/2017, 12:57 PMKotlinCompile' is compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler
Here's my gradle configCzar
09/26/2017, 12:57 PMdagguh
09/26/2017, 4:43 PMbuild.gradle.kts
. I'm using Gradle 4.2 and Kotlin 1.1.50jlleitschuh
09/26/2017, 4:46 PMdagguh
09/26/2017, 4:48 PMjlleitschuh
09/26/2017, 4:49 PMjlleitschuh
09/26/2017, 4:53 PM$JAVA_HOME
variable set to JDK 9 correctly?dagguh
09/26/2017, 4:58 PMjlleitschuh
09/26/2017, 5:00 PM./gradlew -version
that will tell you what version of Java gradle is running.
I think the only case where the kotlin compiler wont produce JDK 6 bytecode is when you enable the compiler flag to support generating JDK 8 compliant default methods on interfaces.
@h0tk3y Am I correct or totally wrong?dagguh
09/26/2017, 5:01 PMdagguh
09/26/2017, 5:02 PMdagguh
09/26/2017, 5:05 PMCannot access class 'java.lang.String'. Check your module classpath for missing or conflicting dependencies
Thanks 🙂 I'll dig deeperjlleitschuh
09/26/2017, 5:10 PMdagguh
09/26/2017, 5:12 PMjlleitschuh
09/26/2017, 5:13 PMdagguh
09/26/2017, 5:16 PMe: D:\Work\some-project\build.gradle.kts:9:8: Unresolved reference: java
and this line reads:
import java.net.URI
dagguh
09/26/2017, 5:16 PMtestCompilation.sourceCompatibility = "9"
testCompilation.targetCompatibility = "9"
etc.