EcoEnchants/build.gradle

118 lines
3.1 KiB
Groovy
Raw Normal View History

2022-08-29 23:37:00 +02:00
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10"
}
}
2020-11-17 15:42:37 +01:00
plugins {
id 'java-library'
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 {
2022-08-29 23:37:00 +02:00
apply plugin: 'kotlin'
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/' }
maven { url 'https://papermc.io/repo/repository/maven-public/' }
2022-08-29 23:37:00 +02:00
maven { url 'https://repo.essentialsx.net/releases/' }
2022-08-31 13:51:25 +02:00
maven { url 'https://repo.codemc.io/repository/nms/' }
2020-12-22 02:41:37 +01:00
}
2020-12-22 15:07:44 +01:00
jar {
onlyIf { !sourceSets.main.allSource.files.isEmpty() }
}
shadowJar {
relocate('com.willfp.libreforge', 'com.willfp.ecoenchants.libreforge')
2022-05-20 19:27:25 +02:00
relocate('org.joml', 'com.willfp.ecoenchants.libreforge.joml')
}
2020-12-22 02:41:37 +01:00
dependencies {
2022-10-24 18:06:17 +02:00
compileOnly 'com.willfp:eco:6.44.0'
2023-01-13 19:09:44 +01:00
implementation 'com.willfp:libreforge:3.127.2'
2022-08-29 23:37:00 +02:00
implementation 'org.joml:joml:1.10.4'
2021-11-01 22:27:58 +01:00
2022-08-29 23:37:00 +02:00
compileOnly 'org.jetbrains:annotations:23.0.0'
compileOnly 'com.github.ben-manes.caffeine:caffeine:3.0.6'
2020-12-23 15:11:17 +01:00
2022-08-29 23:37:00 +02:00
compileOnly 'org.jetbrains.kotlin:kotlin-stdlib:1.7.10'
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 {
2022-08-29 23:37:00 +02:00
filesNotMatching(["**/*.png", "**/models/**", "**/textures/**", "**enchants.yml", "**lang.yml"]) {
expand projectVersion: project.version
2020-12-22 02:41:37 +01:00
}
}
2022-08-29 23:37:00 +02:00
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
kotlinOptions {
jvmTarget = "17"
freeCompilerArgs += ["-Xjvm-default=all"]
}
}
2021-12-13 23:15:25 +01:00
java.sourceCompatibility = JavaVersion.VERSION_17
java.targetCompatibility = JavaVersion.VERSION_17
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
}
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
version = findProperty("version")
2020-11-17 15:42:37 +01:00
2022-08-29 23:37:00 +02:00
build.dependsOn shadowJar
2022-02-18 16:08:35 +01:00
task buyThePlugins {
dependsOn subprojects.build
doLast {
println 'If you like the plugin, please consider buying it on Spigot or Polymart!'
println 'Spigot: https://www.spigotmc.org/resources/authors/auxilor.507394/'
println 'Polymart: https://polymart.org/user/auxilor.1107/'
println 'Buying gives you access to support and the plugin auto-updater, and it allows me to keep developing plugins.'
}
}
2022-05-15 14:34:17 +02:00
build.finalizedBy buyThePlugins