added multi-release-jar plugin

This commit is contained in:
2020-11-09 09:14:15 +01:00
parent b38dd1f12c
commit 6f7ddc42ce
8 changed files with 240 additions and 38 deletions

View File

@@ -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.
}
}