added multi-release-jar plugin
This commit is contained in:
@@ -13,9 +13,33 @@ dependencies {
|
||||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
|
||||
}
|
||||
|
||||
gradlePlugin {
|
||||
val dependencyExportPlugin by plugins.creating {
|
||||
id = "net.woggioni.plugins.dependency-export"
|
||||
implementationClass = "net.woggioni.plugins.dependency.export.DependencyExportPlugin"
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
arrayOf("apiElements", "runtimeElements").forEach { name : String ->
|
||||
val conf = project.configurations.getByName(name)
|
||||
conf.attributes {
|
||||
attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 8)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
gradlePlugin {
|
||||
plugins {
|
||||
create("DependencyExportPlugin") {
|
||||
id = "net.woggioni.plugins.dependency-export"
|
||||
implementationClass = "net.woggioni.plugins.dependency.export.DependencyExportPlugin"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
languageVersion = "1.3"
|
||||
apiVersion = "1.3"
|
||||
jvmTarget = "1.8"
|
||||
javaParameters = true // Useful for reflection.
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user