snowe
07/20/2018, 9:21 PMp-schneider
07/20/2018, 9:44 PM::class.java
after the KotlinCompile
so tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class.java).all {
would work, but the better way is to use tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
as far as i know the .all
is not required here
And you should then be able to use an import statement to get rid of the org.jetbrains.kotlin.gradle.tasks.
prefix within the scriptsnowe
07/20/2018, 10:06 PMnapperley
07/20/2018, 10:15 PMplugins {
kotlin(module = "jvm") version "1.2.51"
}
napperley
07/20/2018, 10:16 PMsnowe
07/20/2018, 10:17 PMsnowe
07/20/2018, 10:19 PMwithType<>
syntax didn't fail, but I'm still seeing. CalculatorMessageStructure.kt: (122, 9): Calls to static methods in Java interfaces are prohibited in JVM target 1.6. Recompile with '-jvm-target 1.8'
snowe
07/20/2018, 10:19 PMplugins {
base
java
kotlin("jvm") version "1.2.51"
// application
}
group = "com.company.loanplatform"
version = "1.0.0-SNAPSHOT-test"
allprojects {
apply {
plugin("org.jetbrains.kotlin.jvm")
}
repositories {
mavenCentral()
mavenLocal()
jcenter()
}
dependencies {
implementation("com.company.enterprise:pt-enterprise-dependencies:0.15.0-SNAPSHOT")
}
}
dependencies {
implementation("com.company.enterprise:pt-enterprise-dependencies:0.15.0-SNAPSHOT")
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
suppressWarnings = true
jvmTarget = "1.8"
}
}
snowe
07/20/2018, 10:20 PMplugins {
kotlin("jvm")
}
dependencies {
implementation("com.company.enterprise:pt-enterprise-dependencies:0.15.0-SNAPSHOT")
compile(kotlin("stdlib"))
...
}
napperley
07/20/2018, 10:21 PMsnowe
07/20/2018, 10:24 PMsnowe
07/20/2018, 10:24 PMsnowe
07/20/2018, 10:24 PMVersion: 1.2.51-release-IJ2018.2-1
napperley
07/20/2018, 10:43 PMimport org.jetbrains.kotlin.gradle.tasks.KotlinCompile
group = "org.example"
version = "0.1-SNAPSHOT"
val kotlinVer = "1.2.51"
repositories {
jcenter()
mavenCentral()
}
plugins {
kotlin(module = "jvm") version "1.2.51"
application
}
tasks.withType(KotlinCompile::class.java) {
kotlinOptions.jvmTarget = "1.8"
}
application {
mainClassName = "org.example.hellokotlin.MainKt"
}
dependencies {
compile(kotlin(module = "stdlib-jdk8", version = kotlinVer))
}
napperley
07/20/2018, 10:47 PM// ...
dependencies {
// ...
compile(kotlin(module = "stdlib-jdk8", version = kotlinVer))
}
snowe
07/20/2018, 11:55 PMnapperley
07/21/2018, 6:51 AMsnowe
07/22/2018, 4:15 AMnapperley
07/22/2018, 10:26 PMsnowe
07/23/2018, 3:23 PMallprojects
and that mostly works...napperley
07/23/2018, 10:26 PMsnowe
07/23/2018, 10:34 PM.all