Convert instrumentation

This commit is contained in:
Ilya Chernikov
2017-11-07 09:54:36 +01:00
committed by Vyacheslav Gerasimov
parent 10732a1bdd
commit 28689f631c
+4 -4
View File
@@ -104,7 +104,7 @@ open class IntelliJInstrumentCodeTask : ConventionTask() {
output?.deleteRecursively() output?.deleteRecursively()
copyOriginalClasses() copyOriginalClasses()
val classpath = project.ideaSdkDeps("javac2.jar", "jdom.jar", "asm-all.jar", "jgoodies-forms.jar") val classpath = project.intellij { include("javac2.jar", "jdom.jar", "asm-all.jar", "jgoodies-forms.jar") }
ant.withGroovyBuilder { ant.withGroovyBuilder {
"taskdef"("name" to "instrumentIdeaExtensions", "taskdef"("name" to "instrumentIdeaExtensions",
@@ -114,7 +114,7 @@ open class IntelliJInstrumentCodeTask : ConventionTask() {
} }
logger.info("Compiling forms and instrumenting code with nullability preconditions") logger.info("Compiling forms and instrumenting code with nullability preconditions")
val instrumentNotNull = prepareNotNullInstrumenting(classpath) val instrumentNotNull = prepareNotNullInstrumenting(classpath.asPath)
instrumentCode(sourceDirs, instrumentNotNull) instrumentCode(sourceDirs, instrumentNotNull)
} }
@@ -125,10 +125,10 @@ open class IntelliJInstrumentCodeTask : ConventionTask() {
} }
} }
private fun prepareNotNullInstrumenting(classpath: ConfigurableFileCollection): Boolean { private fun prepareNotNullInstrumenting(classpath: String): Boolean {
ant.withGroovyBuilder { ant.withGroovyBuilder {
"typedef"("name" to "skip", "typedef"("name" to "skip",
"classpath" to classpath.asPath, "classpath" to classpath,
"loaderref" to LOADER_REF, "loaderref" to LOADER_REF,
"classname" to FILTER_ANNOTATION_REGEXP_CLASS) "classname" to FILTER_ANNOTATION_REGEXP_CLASS)
} }