@@ -13,6 +13,7 @@ plugins {
1313 id(" com.github.johnrengelman.shadow" ) version " 7.1.2"
1414 `maven- publish`
1515 signing
16+ idea
1617}
1718
1819repositories {
@@ -35,21 +36,19 @@ buildConfig {
3536
3637 buildConfigField(" String" , " APP_NAME" , " \" ${project.name} \" " )
3738 buildConfigField(" String" , " APP_VERSION" , provider { " \" ${project.version} \" " })
38- buildConfigField(" java.time.ZonedDateTime" , " APP_BUILD_TIME" , provider { " java.time.ZonedDateTime.parse(\" $dateTime \" )" })
39+ buildConfigField(" java.time.ZonedDateTime" ,
40+ " APP_BUILD_TIME" ,
41+ provider { " java.time.ZonedDateTime.parse(\" $dateTime \" )" })
3942 buildConfigField(" String" , " KOTLIN_VERSION" , provider { " \" ${kotlinVersion} \" " })
4043}
4144
4245sourceSets {
4346 create(" integration" ) {
44- // test { //With that idea can understand that 'integration' is a test source set and do not complain about test
45- // names starting with upper case, but it doesn't compile correctly with it
46- java {
47- srcDir(" $projectDir /src/integration/kotlin" )
48- }
47+ kotlin.srcDir(" $projectDir /src/integration/kotlin" )
4948 resources.srcDir(" $projectDir /src/integration/resources" )
49+
5050 compileClasspath + = main.get().output + test.get().output
5151 runtimeClasspath + = main.get().output + test.get().output
52- // }
5352 }
5453}
5554
@@ -63,6 +62,13 @@ configurations {
6362 get(" integrationRuntimeOnly" ).extendsFrom(get(" testRuntimeOnly" ))
6463}
6564
65+ idea {
66+ module {
67+ @Suppress(" UnstableApiUsage" )
68+ testSources.from(sourceSets[" integration" ].kotlin.srcDirs)
69+ }
70+ }
71+
6672java {
6773 toolchain {
6874 languageVersion.set(JavaLanguageVersion .of(8 ))
@@ -78,7 +84,7 @@ tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().all {
7884 }
7985}
8086
81- tasks.create<Test >(" integration " ) {
87+ tasks.create<Test >(" integrationTest " ) {
8288 val itags = System .getProperty(" includeTags" ) ? : " "
8389 val etags = System .getProperty(" excludeTags" ) ? : " "
8490
@@ -101,7 +107,7 @@ tasks.create<Test>("integration") {
101107 testClassesDirs = sourceSets[" integration" ].output.classesDirs
102108 classpath = sourceSets[" integration" ].runtimeClasspath
103109 outputs.upToDateWhen { false }
104- mustRunAfter(tasks[" test" ])
110+ // mustRunAfter(tasks["test"])
105111 // dependsOn(tasks["assemble"], tasks["test"])
106112
107113 doLast {
@@ -205,8 +211,7 @@ application {
205211 mainClass.set(project.group.toString() + " .KscriptKt" )
206212}
207213
208- val jar: Task by tasks.getting {
209- }
214+ val jar: Task by tasks.getting {}
210215
211216val shadowDistTar: Task by tasks.getting {
212217 enabled = false
0 commit comments