Files
kotlin-fork/libraries/tools/kotlin-annotation-processing/build.gradle.kts
T
Alexey Tsvetkov 8a82c1618c Use Plugins DSL in Kotlin Gradle scripts
When plugins DSL is used, there is no need to
manually generate typesafe accessors for extensions and
conventions (by running `./gradlew kotlinDslAccessorsSnapshot`).
2018-03-26 16:09:29 +03:00

44 lines
1.1 KiB
Kotlin

import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.gradle.api.internal.artifacts.publish.ArchivePublishArtifact
import org.gradle.jvm.tasks.Jar
description = "Annotation Processor wrapper for Kotlin"
plugins {
kotlin("jvm")
}
val packedJars by configurations.creating
dependencies {
compile(projectDist(":kotlin-stdlib"))
compileOnly(project(":kotlin-annotation-processing"))
compileOnly(gradleApi())
testCompile(gradleApi())
compileOnly("com.android.tools.build:gradle:1.1.0")
testCompile("com.android.tools.build:gradle:1.1.0")
testCompile(commonDep("junit:junit"))
packedJars(project(":kotlin-annotation-processing")) { isTransitive = false }
runtime(projectRuntimeJar(":kotlin-compiler-embeddable"))
}
projectTest {
workingDir = projectDir
}
val jar: Jar by tasks
jar.apply {
classifier = "base"
}
runtimeJar(rewriteDepsToShadedCompiler(
task<ShadowJar>("shadowJar") {
from(packedJars)
from(the<JavaPluginConvention>().sourceSets.getByName("main").output)
}
))
sourcesJar()
javadocJar()
publish()