|
|
|
plugins {
|
|
|
|
id 'org.ajoberstar.grgit' version '4.1.1'
|
|
|
|
id 'java'
|
|
|
|
}
|
|
|
|
|
|
|
|
group 'me.william278'
|
|
|
|
version "$ext.plugin_version+${versionMetadata()}"
|
|
|
|
|
|
|
|
ext {
|
|
|
|
set 'version', version.toString()
|
|
|
|
}
|
|
|
|
|
|
|
|
import org.apache.tools.ant.filters.ReplaceTokens
|
|
|
|
allprojects {
|
|
|
|
apply plugin: 'java'
|
|
|
|
apply plugin: 'maven-publish'
|
|
|
|
|
|
|
|
compileJava.options.encoding = 'UTF-8'
|
|
|
|
javadoc.options.encoding = 'UTF-8'
|
|
|
|
|
|
|
|
compileJava.options.release.set 16
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenLocal()
|
|
|
|
mavenCentral()
|
|
|
|
maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
|
|
|
|
maven { url 'https://repo.velocitypowered.com/snapshots/' }
|
|
|
|
maven { url 'https://repo.minebench.de/' }
|
|
|
|
maven { url 'https://repo.codemc.org/repository/maven-public' }
|
|
|
|
maven { url 'https://repo.alessiodp.com/releases/' }
|
|
|
|
maven { url 'https://jitpack.io' }
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation 'redis.clients:jedis:3.7.1'
|
|
|
|
}
|
|
|
|
|
|
|
|
processResources {
|
|
|
|
filter ReplaceTokens as Class, beginToken: '${', endToken: '}',
|
|
|
|
tokens: rootProject.ext.properties
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
subprojects {
|
|
|
|
version rootProject.version
|
|
|
|
archivesBaseName = "${rootProject.name}-${project.name.capitalize()}"
|
|
|
|
}
|
|
|
|
|
|
|
|
logger.lifecycle("Building HuskSync ${version} by Willam278")
|
|
|
|
|
|
|
|
def versionMetadata() {
|
|
|
|
if (grgit == null) {
|
|
|
|
return System.getenv("GITHUB_RUN_NUMBER") ? 'build.' + System.getenv("GITHUB_RUN_NUMBER") : 'unknown'
|
|
|
|
}
|
|
|
|
|
|
|
|
return 'rev.'+ grgit.head().abbreviatedId + (grgit.status().clean ? '' : '-indev')
|
|
|
|
}
|