|
|
@ -1,3 +1,5 @@
|
|
|
|
|
|
|
|
import org.apache.tools.ant.filters.ReplaceTokens
|
|
|
|
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
plugins {
|
|
|
|
id 'com.github.johnrengelman.shadow' version '8.1.1'
|
|
|
|
id 'com.github.johnrengelman.shadow' version '8.1.1'
|
|
|
|
id 'org.cadixdev.licenser' version '0.6.1' apply false
|
|
|
|
id 'org.cadixdev.licenser' version '0.6.1' apply false
|
|
|
@ -52,19 +54,16 @@ publishing {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
import org.apache.tools.ant.filters.ReplaceTokens
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
allprojects {
|
|
|
|
allprojects {
|
|
|
|
apply plugin: 'com.github.johnrengelman.shadow'
|
|
|
|
apply plugin: 'com.github.johnrengelman.shadow'
|
|
|
|
apply plugin: 'org.cadixdev.licenser'
|
|
|
|
apply plugin: 'org.cadixdev.licenser'
|
|
|
|
apply plugin: 'java'
|
|
|
|
apply plugin: 'java'
|
|
|
|
|
|
|
|
|
|
|
|
compileJava.options.encoding = 'UTF-8'
|
|
|
|
compileJava.options.encoding = 'UTF-8'
|
|
|
|
|
|
|
|
compileJava.options.release.set 17
|
|
|
|
javadoc.options.encoding = 'UTF-8'
|
|
|
|
javadoc.options.encoding = 'UTF-8'
|
|
|
|
javadoc.options.addStringOption('Xdoclint:none', '-quiet')
|
|
|
|
javadoc.options.addStringOption('Xdoclint:none', '-quiet')
|
|
|
|
|
|
|
|
|
|
|
|
compileJava.options.release.set 16
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
repositories {
|
|
|
|
mavenLocal()
|
|
|
|
mavenLocal()
|
|
|
|
mavenCentral()
|
|
|
|
mavenCentral()
|
|
|
@ -95,8 +94,10 @@ allprojects {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
processResources {
|
|
|
|
processResources {
|
|
|
|
filter ReplaceTokens as Class, beginToken: '${', endToken: '}',
|
|
|
|
filesMatching(['**/*.json', '**/*.yml']) {
|
|
|
|
tokens: rootProject.ext.properties
|
|
|
|
filter ReplaceTokens as Class, beginToken: '${', endToken: '}',
|
|
|
|
|
|
|
|
tokens: rootProject.ext.properties
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -108,47 +109,41 @@ subprojects {
|
|
|
|
from '../LICENSE'
|
|
|
|
from '../LICENSE'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (['paper'].contains(project.name)) {
|
|
|
|
shadowJar {
|
|
|
|
compileJava.options.release.set 17
|
|
|
|
destinationDirectory.set(file("$rootDir/target"))
|
|
|
|
|
|
|
|
archiveClassifier.set('')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (['bukkit', 'paper', 'plugin'].contains(project.name)) {
|
|
|
|
// API publishing
|
|
|
|
shadowJar {
|
|
|
|
if (['common', 'bukkit'].contains(project.name)) {
|
|
|
|
|
|
|
|
java {
|
|
|
|
|
|
|
|
withSourcesJar()
|
|
|
|
|
|
|
|
withJavadocJar()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
sourcesJar {
|
|
|
|
destinationDirectory.set(file("$rootDir/target"))
|
|
|
|
destinationDirectory.set(file("$rootDir/target"))
|
|
|
|
archiveClassifier.set('')
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
javadocJar {
|
|
|
|
// API publishing
|
|
|
|
destinationDirectory.set(file("$rootDir/target"))
|
|
|
|
if (['common', 'bukkit'].contains(project.name)) {
|
|
|
|
}
|
|
|
|
java {
|
|
|
|
shadowJar.dependsOn(sourcesJar, javadocJar)
|
|
|
|
withSourcesJar()
|
|
|
|
|
|
|
|
withJavadocJar()
|
|
|
|
publishing {
|
|
|
|
}
|
|
|
|
publications {
|
|
|
|
sourcesJar {
|
|
|
|
mavenJavaCommon(MavenPublication) {
|
|
|
|
destinationDirectory.set(file("$rootDir/target"))
|
|
|
|
groupId = 'net.william278.husksync'
|
|
|
|
}
|
|
|
|
artifactId = "husksync-${project.name}"
|
|
|
|
javadocJar {
|
|
|
|
version = "$rootProject.version"
|
|
|
|
destinationDirectory.set(file("$rootDir/target"))
|
|
|
|
artifact shadowJar
|
|
|
|
}
|
|
|
|
artifact sourcesJar
|
|
|
|
shadowJar.dependsOn(sourcesJar, javadocJar)
|
|
|
|
artifact javadocJar
|
|
|
|
|
|
|
|
|
|
|
|
publishing {
|
|
|
|
|
|
|
|
publications {
|
|
|
|
|
|
|
|
mavenJavaCommon(MavenPublication) {
|
|
|
|
|
|
|
|
groupId = 'net.william278.husksync'
|
|
|
|
|
|
|
|
artifactId = "husksync-${project.name}"
|
|
|
|
|
|
|
|
version = "$rootProject.version"
|
|
|
|
|
|
|
|
artifact shadowJar
|
|
|
|
|
|
|
|
artifact sourcesJar
|
|
|
|
|
|
|
|
artifact javadocJar
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
jar.dependsOn(shadowJar)
|
|
|
|
|
|
|
|
clean.delete "$rootDir/target"
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
jar.dependsOn(shadowJar)
|
|
|
|
|
|
|
|
clean.delete "$rootDir/target"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
logger.lifecycle("Building HuskSync ${version} by William278")
|
|
|
|
logger.lifecycle("Building HuskSync ${version} by William278")
|
|
|
|