2020-11-17 15:42:37 +01:00
|
|
|
plugins {
|
|
|
|
id 'java-library'
|
2021-06-11 13:24:24 +02:00
|
|
|
id 'com.github.johnrengelman.shadow' version '7.0.0'
|
2020-11-17 15:42:37 +01:00
|
|
|
id 'maven-publish'
|
|
|
|
id 'java'
|
|
|
|
}
|
|
|
|
|
2020-12-22 02:41:37 +01:00
|
|
|
dependencies {
|
2020-12-22 15:15:51 +01:00
|
|
|
implementation project(":eco-core").getSubprojects()
|
2020-12-22 02:41:37 +01:00
|
|
|
}
|
|
|
|
|
2020-11-17 15:42:37 +01:00
|
|
|
allprojects {
|
2020-11-19 09:44:26 +01:00
|
|
|
apply plugin: 'java'
|
2020-12-13 19:09:28 +01:00
|
|
|
apply plugin: 'maven-publish'
|
2020-12-22 02:41:37 +01:00
|
|
|
apply plugin: 'com.github.johnrengelman.shadow'
|
|
|
|
|
2020-11-17 15:42:37 +01:00
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2020-12-12 13:24:39 +01:00
|
|
|
mavenLocal()
|
2020-12-22 02:41:37 +01:00
|
|
|
maven { url 'https://jitpack.io' }
|
2020-12-12 13:09:53 +01:00
|
|
|
maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
|
2020-12-12 20:06:44 +01:00
|
|
|
maven { url 'https://repo.codemc.org/repository/nms/' }
|
2020-12-22 17:10:49 +01:00
|
|
|
maven { url 'https://repo.codemc.org/repository/maven-public' }
|
|
|
|
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
|
|
|
|
maven { url 'https://oss.sonatype.org/content/groups/public/' }
|
|
|
|
maven { url 'https://maven.enginehub.org/repo/' }
|
|
|
|
maven { url 'https://ci.ender.zone/plugin/repository/project/' }
|
|
|
|
maven { url 'https://ci.ender.zone/plugin/repository/everything/' }
|
|
|
|
maven { url 'https://repo.md-5.net/content/repositories/snapshots/' }
|
|
|
|
maven { url 'https://repo.dmulloy2.net/nexus/repository/public/' }
|
|
|
|
maven { url 'https://papermc.io/repo/repository/maven-public/' }
|
|
|
|
maven { url 'https://repo.maven.apache.org/maven2/' }
|
|
|
|
maven { url 'https://repo.dustplanet.de/artifactory/ext-release-local/' }
|
|
|
|
maven { url 'https://libraries.minecraft.net/' }
|
|
|
|
maven { url 'https://repo.spongepowered.org/maven/' }
|
|
|
|
maven { url 'https://org.kitteh.pastegg' }
|
|
|
|
maven { url 'https://repo.mikeprimm.com/' }
|
|
|
|
maven { url 'https://maven.sk89q.com/repo/' }
|
|
|
|
maven { url 'https://github.com/factions-site/repo/raw/public/' }
|
2020-12-22 02:41:37 +01:00
|
|
|
}
|
|
|
|
|
2020-12-22 15:07:44 +01:00
|
|
|
jar {
|
|
|
|
onlyIf { !sourceSets.main.allSource.files.isEmpty() }
|
|
|
|
}
|
|
|
|
|
2021-01-07 17:16:22 +01:00
|
|
|
compileJava {
|
|
|
|
onlyIf { !sourceSets.main.allSource.files.isEmpty() }
|
|
|
|
}
|
|
|
|
|
2020-12-22 02:41:37 +01:00
|
|
|
dependencies {
|
2021-08-29 17:41:04 +02:00
|
|
|
compileOnly 'com.willfp:eco:6.6.0'
|
2021-01-12 15:56:19 +01:00
|
|
|
|
2020-12-22 02:41:37 +01:00
|
|
|
compileOnly 'org.jetbrains:annotations:19.0.0'
|
2020-12-23 15:11:17 +01:00
|
|
|
|
2021-06-11 13:24:24 +02:00
|
|
|
compileOnly 'org.projectlombok:lombok:1.18.20'
|
|
|
|
annotationProcessor 'org.projectlombok:lombok:1.18.20'
|
2020-12-23 15:11:17 +01:00
|
|
|
|
2021-06-11 13:24:24 +02:00
|
|
|
testCompileOnly 'org.projectlombok:lombok:1.18.20'
|
|
|
|
testAnnotationProcessor 'org.projectlombok:lombok:1.18.20'
|
2020-11-17 15:42:37 +01:00
|
|
|
}
|
2020-11-17 16:22:15 +01:00
|
|
|
|
|
|
|
tasks.withType(JavaCompile) {
|
2020-11-17 16:33:44 +01:00
|
|
|
options.deprecation = true
|
2020-11-17 16:22:15 +01:00
|
|
|
options.encoding = 'UTF-8'
|
|
|
|
}
|
2020-12-22 02:41:37 +01:00
|
|
|
|
|
|
|
processResources {
|
|
|
|
filesNotMatching(["**/*.png", "**/models/**", "**/textures/**"]) {
|
2020-12-22 14:59:53 +01:00
|
|
|
expand projectVersion: project.version
|
2020-12-22 02:41:37 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-17 16:22:15 +01:00
|
|
|
compileJava.options.encoding = 'UTF-8'
|
2020-11-21 13:02:35 +01:00
|
|
|
compileJava.dependsOn clean
|
2021-01-04 15:12:47 +01:00
|
|
|
|
|
|
|
build.dependsOn shadowJar
|
2020-11-17 15:42:37 +01:00
|
|
|
}
|
|
|
|
|
2020-12-22 14:59:53 +01:00
|
|
|
tasks.withType(Jar) {
|
|
|
|
destinationDirectory = file("$rootDir/bin/")
|
|
|
|
}
|
|
|
|
|
2020-11-20 13:50:33 +01:00
|
|
|
clean.doLast {
|
|
|
|
file("${rootDir}/bin").deleteDir()
|
|
|
|
}
|
|
|
|
|
2020-12-22 02:41:37 +01:00
|
|
|
shadowJar {
|
|
|
|
archiveFileName = findProperty("plugin-name") + " v" + findProperty("version") + ".jar"
|
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
2021-03-06 19:59:02 +01:00
|
|
|
archiveFileName = findProperty("plugin-name") + " v" + findProperty("version") + ".jar"
|
2020-12-22 02:41:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
group = 'com.willfp'
|
2020-11-17 15:42:37 +01:00
|
|
|
archivesBaseName = project.name
|
2020-12-22 14:59:53 +01:00
|
|
|
version = findProperty("version")
|
2021-06-11 13:24:24 +02:00
|
|
|
java.sourceCompatibility = JavaVersion.VERSION_16
|
2020-11-17 15:42:37 +01:00
|
|
|
|
2020-12-22 02:41:37 +01:00
|
|
|
compileJava.options.encoding = 'UTF-8'
|
|
|
|
|
2020-11-17 15:42:37 +01:00
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
maven(MavenPublication) {
|
|
|
|
from(components.java)
|
|
|
|
}
|
|
|
|
}
|
2020-11-17 16:22:15 +01:00
|
|
|
}
|