Relocate package org.jetbrains.kotlin in kotlinx-metadata-jvm
To prevent clashes in scenarios where it's used together with the Kotlin compiler (e.g. in annotation processing) #KT-24945 Fixed
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
- Support metadata of local delegated properties (see `JvmDeclarationContainerExtensionVisitor.visitLocalDelegatedProperty`)
|
- Support metadata of local delegated properties (see `JvmDeclarationContainerExtensionVisitor.visitLocalDelegatedProperty`)
|
||||||
- [`KT-24881`](https://youtrack.jetbrains.com/issue/KT-24881) Use correct class loader in kotlinx-metadata to load MetadataExtensions implementations
|
- [`KT-24881`](https://youtrack.jetbrains.com/issue/KT-24881) Use correct class loader in kotlinx-metadata to load MetadataExtensions implementations
|
||||||
|
- [`KT-24945`](https://youtrack.jetbrains.com/issue/KT-24945) Relocate package org.jetbrains.kotlin to fix IllegalAccessError in annotation processing
|
||||||
|
|
||||||
## 0.0.2
|
## 0.0.2
|
||||||
|
|
||||||
|
|||||||
@@ -45,13 +45,14 @@ dependencies {
|
|||||||
|
|
||||||
noDefaultJar()
|
noDefaultJar()
|
||||||
|
|
||||||
val shadowJar = task<ShadowJar>("shadowJar") {
|
task<ShadowJar>("shadowJar") {
|
||||||
callGroovy("manifestAttributes", manifest, project)
|
callGroovy("manifestAttributes", manifest, project)
|
||||||
manifest.attributes["Implementation-Version"] = version
|
manifest.attributes["Implementation-Version"] = version
|
||||||
|
|
||||||
from(mainSourceSet.output)
|
from(mainSourceSet.output)
|
||||||
exclude("**/*.proto")
|
exclude("**/*.proto")
|
||||||
configurations = listOf(shadows)
|
configurations = listOf(shadows)
|
||||||
|
relocate("org.jetbrains.kotlin", "kotlinx.metadata.internal")
|
||||||
|
|
||||||
val artifactRef = outputs.files.singleFile
|
val artifactRef = outputs.files.singleFile
|
||||||
runtimeJarArtifactBy(this, artifactRef)
|
runtimeJarArtifactBy(this, artifactRef)
|
||||||
|
|||||||
@@ -6,10 +6,13 @@ configurations {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(':kotlin-stdlib')
|
compile project(':kotlin-stdlib')
|
||||||
compile project(':kotlinx-metadata')
|
compileOnly project(':kotlinx-metadata')
|
||||||
compile project(':kotlinx-metadata-jvm')
|
compileOnly project(':kotlinx-metadata-jvm')
|
||||||
compile 'org.ow2.asm:asm:6.0'
|
compile 'org.ow2.asm:asm:6.0'
|
||||||
compile 'org.ow2.asm:asm-tree:6.0'
|
compile 'org.ow2.asm:asm-tree:6.0'
|
||||||
|
|
||||||
|
runtime project(path: ':kotlinx-metadata-jvm', configuration: 'runtime')
|
||||||
|
|
||||||
testCompile project(':kotlin-test:kotlin-test-junit')
|
testCompile project(':kotlin-test:kotlin-test-junit')
|
||||||
|
|
||||||
testArtifacts project(':kotlin-stdlib')
|
testArtifacts project(':kotlin-stdlib')
|
||||||
|
|||||||
@@ -7,14 +7,21 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val shadows by configurations.creating
|
val shadows by configurations.creating
|
||||||
shadows.extendsFrom(configurations.getByName("compile"))
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile(project(":kotlinx-metadata"))
|
compileOnly(project(":kotlinx-metadata"))
|
||||||
compile(project(":kotlinx-metadata-jvm"))
|
compileOnly(project(":kotlinx-metadata-jvm"))
|
||||||
compile("org.ow2.asm:asm:6.0")
|
compile("org.ow2.asm:asm:6.0")
|
||||||
|
|
||||||
|
testCompileOnly(project(":kotlinx-metadata"))
|
||||||
|
testCompileOnly(project(":kotlinx-metadata-jvm"))
|
||||||
testCompile(commonDep("junit:junit"))
|
testCompile(commonDep("junit:junit"))
|
||||||
testCompile(projectTests(":generators:test-generator"))
|
testCompile(projectTests(":generators:test-generator"))
|
||||||
|
|
||||||
|
testRuntime(project(":kotlinx-metadata-jvm", configuration = "runtime"))
|
||||||
|
|
||||||
|
shadows(project(":kotlinx-metadata-jvm", configuration = "runtime"))
|
||||||
|
shadows("org.ow2.asm:asm:6.0")
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
@@ -42,4 +49,9 @@ tasks {
|
|||||||
"assemble" {
|
"assemble" {
|
||||||
dependsOn(shadowJar)
|
dependsOn(shadowJar)
|
||||||
}
|
}
|
||||||
}
|
"test" {
|
||||||
|
// These dependencies are needed because ForTestCompileRuntime loads jars from dist
|
||||||
|
dependsOn(":kotlin-reflect:dist")
|
||||||
|
dependsOn(":kotlin-script-runtime:dist")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user