Switch ASM artifact

This commit is contained in:
Mikhael Bogdanov
2020-11-25 08:16:11 +01:00
parent b5143ba2ab
commit 8f187f328a
4 changed files with 11 additions and 8 deletions
@@ -45,7 +45,7 @@ dependencies {
// Workaround for missing transitive import of the common(project `kotlin-test-common`
// for `kotlin-test-jvm` into the IDE:
testCompileOnly(project(":kotlin-test:kotlin-test-common")) { isTransitive = false }
testCompileOnly("org.ow2.asm:asm:9.0")
testCompileOnly("org.jetbrains.intellij.deps:asm-all:9.0")
}
// Aapt2 from Android Gradle Plugin 3.2 and below does not handle long paths on Windows.
@@ -5,9 +5,9 @@
package org.jetbrains.kotlin.gradle.incapt;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
import org.jetbrains.org.objectweb.asm.ClassWriter;
import org.jetbrains.org.objectweb.asm.Opcodes;
import org.jetbrains.org.objectweb.asm.Type;
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.RoundEnvironment;
@@ -20,8 +20,8 @@ import java.io.OutputStream;
import java.util.Collections;
import java.util.Set;
import static org.objectweb.asm.Opcodes.ACC_PUBLIC;
import static org.objectweb.asm.Opcodes.ACC_SUPER;
import static org.jetbrains.org.objectweb.asm.Opcodes.ACC_PUBLIC;
import static org.jetbrains.org.objectweb.asm.Opcodes.ACC_SUPER;
/** Simple processor that generates a class for every annotated element (class, field, method). */
public class IncrementalBinaryIsolatingProcessor extends AbstractProcessor {
@@ -218,7 +218,7 @@ fun BaseGradleIT.Project.setupIncrementalAptProject(
val processorPath = generateProcessor(*processors)
val updatedContent = content.replace(
Regex("^\\s*kapt\\s\"org\\.jetbrain.*$", RegexOption.MULTILINE),
Regex("^\\s*kapt\\s\"org\\.jetbrains\\.kotlin.*$", RegexOption.MULTILINE),
" kapt files(\"${processorPath.invariantSeparatorsPath}\")"
)
buildFile.writeText(updatedContent)
@@ -15,12 +15,15 @@ apply plugin: "kotlin-kapt"
repositories {
jcenter()
mavenLocal()
maven {
url "https://jetbrains.bintray.com/intellij-third-party-dependencies/"
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "org.jetbrains.kotlin:annotation-processor-example:$kotlin_version"
kapt "org.jetbrains.kotlin:annotation-processor-example:$kotlin_version"
kapt "org.ow2.asm:asm:9.0"
kapt "org.jetbrains.intellij.deps:asm-all:9.0"
testImplementation 'junit:junit:4.12'
}