Skip to content

Commit 81c138e

Browse files
committed
Some tiny improvements like fixing indentation
1 parent f05bdf2 commit 81c138e

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlin_version = '1.3.11'
2+
ext.kotlin_version = '1.3.21'
33

44
repositories {
55
mavenCentral()
@@ -13,7 +13,7 @@ buildscript {
1313

1414
plugins {
1515
id 'java'
16-
id 'org.jetbrains.kotlin.jvm' version '1.3.11'
16+
id 'org.jetbrains.kotlin.jvm' version '1.3.21'
1717
}
1818

1919
apply plugin: 'kotlin'

src/main/kotlin/com/tschuchort/compiletesting/KotlinCompilation.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ data class KotlinCompilation(
329329
}
330330

331331
return convertKotlinExitCode(
332-
K2JVMCompiler().execImpl(messageCollector, Services.EMPTY, k2JvmArgs))
332+
K2JVMCompiler().exec(messageCollector, Services.EMPTY, k2JvmArgs))
333333
}
334334

335335
/** Performs the 3rd compilation step to compile Kotlin source files */
@@ -349,7 +349,7 @@ data class KotlinCompilation(
349349
}
350350

351351
return convertKotlinExitCode(
352-
K2JVMCompiler().execImpl(messageCollector, Services.EMPTY, k2JvmArgs))
352+
K2JVMCompiler().exec(messageCollector, Services.EMPTY, k2JvmArgs))
353353
}
354354

355355
/**

src/main/kotlin/com/tschuchort/compiletesting/Utils.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ internal fun <E> MutableCollection<E>.addAll(vararg elems: E) = addAll(elems)
77

88
internal fun getJavaHome(): File {
99
val path = System.getProperty("java.home")
10+
?: System.getenv("JAVA_HOME")
1011
?: throw IllegalStateException("no java home found")
1112

1213
return File(path).also { check(it.isDirectory) }

src/test/kotlin/com/tschuchort/compiletesting/KotlinTestProcessor.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ class KotlinTestProcessor : AbstractProcessor() {
7070

7171
if(annotations.isEmpty()) {
7272
FileSpec.builder(GENERATED_PACKAGE, GENERATED_KOTLIN_CLASS_NAME + ".kt")
73-
.addType(
74-
TypeSpec.classBuilder(GENERATED_KOTLIN_CLASS_NAME).build()
75-
).build()
76-
.let { writeKotlinFile(it) }
73+
.addType(
74+
TypeSpec.classBuilder(GENERATED_KOTLIN_CLASS_NAME).build()
75+
).build()
76+
.let { writeKotlinFile(it) }
7777

78-
JavaFile.builder(GENERATED_PACKAGE, JavaTypeSpec.classBuilder(GENERATED_JAVA_CLASS_NAME).build())
79-
.build().writeTo(processingEnv.filer)
78+
JavaFile.builder(GENERATED_PACKAGE, JavaTypeSpec.classBuilder(GENERATED_JAVA_CLASS_NAME).build())
79+
.build().writeTo(processingEnv.filer)
8080
}
8181

8282
return false

0 commit comments

Comments
 (0)