104 lines
2.2 KiB
Groovy
104 lines
2.2 KiB
Groovy
plugins {
|
|
id 'java-gradle-plugin'
|
|
id 'net.woggioni.gradle.lombok' apply false
|
|
id 'maven-publish'
|
|
}
|
|
|
|
allprojects {
|
|
apply plugin: 'java-library'
|
|
apply plugin: 'net.woggioni.gradle.lombok'
|
|
|
|
repositories {
|
|
maven {
|
|
url = woggioniMavenRepositoryUrl
|
|
}
|
|
mavenCentral()
|
|
}
|
|
|
|
group = "net.woggioni.gradle"
|
|
|
|
lombok {
|
|
version = getProperty('version.lombok')
|
|
}
|
|
|
|
dependencies {
|
|
add("testImplementation", create(group: "org.junit.jupiter", name:"junit-jupiter-api", version: project["version.junitJupiter"]))
|
|
add("testRuntimeOnly", create(group: "org.junit.jupiter", name: "junit-jupiter-engine", version: project["version.junitJupiter"]))
|
|
add("testImplementation", gradleTestKit())
|
|
}
|
|
|
|
tasks.named("test", Test) {
|
|
useJUnitPlatform()
|
|
}
|
|
}
|
|
|
|
version = getProperty("version.envelope")
|
|
|
|
configurations {
|
|
embedded {
|
|
visible = false
|
|
canBeConsumed = false
|
|
}
|
|
compileOnly.extendsFrom(embedded)
|
|
tar {
|
|
visible = false
|
|
canBeConsumed = false
|
|
transitive = false
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
tar project(path: "launcher", configuration: 'tar')
|
|
embedded project(path: "common", configuration: "archives")
|
|
}
|
|
|
|
java {
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
jar {
|
|
manifest {
|
|
attributes "version" : archiveVersion.get()
|
|
}
|
|
from {
|
|
configurations.named('embedded').map {
|
|
it.collect {
|
|
it.isDirectory() ? it : zipTree(it)
|
|
}
|
|
}
|
|
}
|
|
into('LIB-INF') {
|
|
from(configurations.named('tar'))
|
|
}
|
|
}
|
|
|
|
gradlePlugin {
|
|
plugins {
|
|
create("EnvelopePlugin") {
|
|
id = "net.woggioni.gradle.envelope"
|
|
implementationClass = "net.woggioni.gradle.envelope.EnvelopePlugin"
|
|
}
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
repositories {
|
|
maven {
|
|
url = publishMavenRepositoryUrl
|
|
}
|
|
}
|
|
publications {
|
|
maven(MavenPublication) {
|
|
from(components["java"])
|
|
}
|
|
}
|
|
}
|
|
|
|
wrapper {
|
|
gradleVersion = getProperty('version.gradle')
|
|
distributionType = Wrapper.DistributionType.ALL
|
|
}
|
|
|
|
|