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`)
|
||||
- [`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
|
||||
|
||||
|
||||
@@ -45,13 +45,14 @@ dependencies {
|
||||
|
||||
noDefaultJar()
|
||||
|
||||
val shadowJar = task<ShadowJar>("shadowJar") {
|
||||
task<ShadowJar>("shadowJar") {
|
||||
callGroovy("manifestAttributes", manifest, project)
|
||||
manifest.attributes["Implementation-Version"] = version
|
||||
|
||||
from(mainSourceSet.output)
|
||||
exclude("**/*.proto")
|
||||
configurations = listOf(shadows)
|
||||
relocate("org.jetbrains.kotlin", "kotlinx.metadata.internal")
|
||||
|
||||
val artifactRef = outputs.files.singleFile
|
||||
runtimeJarArtifactBy(this, artifactRef)
|
||||
|
||||
@@ -6,10 +6,13 @@ configurations {
|
||||
|
||||
dependencies {
|
||||
compile project(':kotlin-stdlib')
|
||||
compile project(':kotlinx-metadata')
|
||||
compile project(':kotlinx-metadata-jvm')
|
||||
compileOnly project(':kotlinx-metadata')
|
||||
compileOnly project(':kotlinx-metadata-jvm')
|
||||
compile 'org.ow2.asm:asm: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')
|
||||
|
||||
testArtifacts project(':kotlin-stdlib')
|
||||
|
||||
@@ -7,14 +7,21 @@ plugins {
|
||||
}
|
||||
|
||||
val shadows by configurations.creating
|
||||
shadows.extendsFrom(configurations.getByName("compile"))
|
||||
|
||||
dependencies {
|
||||
compile(project(":kotlinx-metadata"))
|
||||
compile(project(":kotlinx-metadata-jvm"))
|
||||
compileOnly(project(":kotlinx-metadata"))
|
||||
compileOnly(project(":kotlinx-metadata-jvm"))
|
||||
compile("org.ow2.asm:asm:6.0")
|
||||
|
||||
testCompileOnly(project(":kotlinx-metadata"))
|
||||
testCompileOnly(project(":kotlinx-metadata-jvm"))
|
||||
testCompile(commonDep("junit:junit"))
|
||||
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 {
|
||||
@@ -42,4 +49,9 @@ tasks {
|
||||
"assemble" {
|
||||
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