File tree Expand file tree Collapse file tree 4 files changed +21
-9
lines changed
src/main/kotlin/com/tschuchort/compiletesting Expand file tree Collapse file tree 4 files changed +21
-9
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ Configure compilation
47
47
sources = listOf (kotlinSource, javaSource)
48
48
49
49
// pass your own instance of an annotation processor
50
- annotationProcessors = listOf (MyAnnotationProcessor ()))
50
+ annotationProcessors = listOf (MyAnnotationProcessor ())
51
51
52
52
inheritClasspath = true
53
53
messageOutputStream = System .out // see diagnostics in real time
@@ -98,7 +98,7 @@ Add dependency to your module `build.gradle` file:
98
98
``` Groovy
99
99
dependencies {
100
100
// ...
101
- implementation 'com.github.tschuchortdev:kotlin-compile-testing:1.1.0 '
101
+ implementation 'com.github.tschuchortdev:kotlin-compile-testing:1.1.2 '
102
102
}
103
103
```
104
104
Original file line number Diff line number Diff line change 1
1
buildscript {
2
- ext. kotlin_version = ' 1.3.21 '
2
+ ext. kotlin_version = ' 1.3.31 '
3
3
4
4
repositories {
5
5
mavenCentral()
@@ -22,7 +22,7 @@ apply plugin: 'idea'
22
22
apply plugin : ' maven'
23
23
24
24
group ' com.tschuchort'
25
- version ' 1.1.0 '
25
+ version ' 1.1.2 '
26
26
27
27
sourceCompatibility = 1.8
28
28
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
3
3
distributionPath =wrapper/dists
4
4
zipStoreBase =GRADLE_USER_HOME
5
5
zipStorePath =wrapper/dists
6
- distributionUrl =https\://services.gradle.org/distributions/gradle-4.10-all.zip
6
+ distributionUrl =https\://services.gradle.org/distributions/gradle-4.10.3 -all.zip
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ import org.jetbrains.kotlin.config.JvmTarget
33
33
import org.jetbrains.kotlin.config.Services
34
34
import java.io.*
35
35
import java.lang.RuntimeException
36
+ import java.net.URI
36
37
import java.net.URLClassLoader
37
38
import java.nio.file.Files
38
39
import java.nio.file.Path
@@ -462,10 +463,21 @@ class KotlinCompilation {
462
463
}
463
464
}
464
465
465
- val resourcesPath = this ::class .java.classLoader
466
- .getResource(" META-INF/services/org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar" ).path
467
- .removeSuffix(" META-INF/services/org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar" )
468
-
466
+ val resourcesUri = URI .create(
467
+ this ::class .java.classLoader
468
+ .getResource(" META-INF/services/org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar" )
469
+ .toString().removeSuffix(" /META-INF/services/org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar" )
470
+ )
471
+
472
+ val resourcesPath = when (resourcesUri.scheme) {
473
+ " jar" -> resourcesUri.schemeSpecificPart.removeSurrounding(" file:" , " !" )
474
+ " file" -> resourcesUri.schemeSpecificPart
475
+ else -> throw IllegalStateException (
476
+ " Don't know how to handle protocol of ComponentRegistrar plugin. " +
477
+ " Did you include this library in a weird way? Only jar and file path are supported."
478
+ )
479
+ }.removePrefix(" /" )
480
+
469
481
val k2JvmArgs = commonK2JVMArgs().also {
470
482
it.freeArgs = sourcePaths
471
483
You can’t perform that action at this time.
0 commit comments