mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 14:38:51 +00:00
Use paper, comment up build.gradle
This commit is contained in:
1 parent
a91e352d64
commit
71b502cbfc
1 file changed
+20
-4
+20
-4
@@ -9,6 +9,7 @@ apply plugin: 'java'
|
|||||||
apply plugin: 'maven-publish'
|
apply plugin: 'maven-publish'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven'
|
||||||
|
|
||||||
|
// Gets the git commit hash of the latest commit, used for version string
|
||||||
ext.projectVersion = '1.0'
|
ext.projectVersion = '1.0'
|
||||||
def gitHash = versionDetails().gitHash
|
def gitHash = versionDetails().gitHash
|
||||||
|
|
||||||
@@ -20,9 +21,9 @@ repositories {
|
|||||||
mavenLocal()
|
mavenLocal()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|
||||||
maven {url = "https://maven.enginehub.org/repo/"}
|
maven {url = 'https://maven.enginehub.org/repo/'}
|
||||||
maven {url = 'https://repo.maven.apache.org/maven2'}
|
maven {url = 'https://repo.maven.apache.org/maven2'}
|
||||||
maven {url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'}
|
maven {url = 'https://papermc.io/repo/repository/maven-public/'}
|
||||||
maven {url = 'https://oss.sonatype.org/content/groups/public/'}
|
maven {url = 'https://oss.sonatype.org/content/groups/public/'}
|
||||||
maven {url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/'}
|
maven {url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/'}
|
||||||
maven {url = 'https://jitpack.io'}
|
maven {url = 'https://jitpack.io'}
|
||||||
@@ -30,36 +31,46 @@ repositories {
|
|||||||
maven {url = 'https://repo.codemc.org/repository/maven-public/'}
|
maven {url = 'https://repo.codemc.org/repository/maven-public/'}
|
||||||
maven {url = 'https://repo.minebench.de/'}
|
maven {url = 'https://repo.minebench.de/'}
|
||||||
maven {url = "https://repo.aikar.co/content/groups/aikar/"}
|
maven {url = "https://repo.aikar.co/content/groups/aikar/"}
|
||||||
maven {url = "https://raw.githubusercontent.com/JorelAli/CommandAPI/mvn-repo/"}
|
maven {url = 'https://raw.githubusercontent.com/JorelAli/CommandAPI/mvn-repo/'}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
// Components
|
||||||
compile 'net.kyori:adventure-api:4.0.0-SNAPSHOT'
|
compile 'net.kyori:adventure-api:4.0.0-SNAPSHOT'
|
||||||
compile 'net.kyori:adventure-nbt:4.0.0-SNAPSHOT'
|
compile 'net.kyori:adventure-nbt:4.0.0-SNAPSHOT'
|
||||||
compile 'net.kyori:adventure-platform-bukkit:4.0.0-SNAPSHOT'
|
compile 'net.kyori:adventure-platform-bukkit:4.0.0-SNAPSHOT'
|
||||||
compile 'net.kyori:adventure-text-minimessage:3.0.0-SNAPSHOT'
|
compile 'net.kyori:adventure-text-minimessage:3.0.0-SNAPSHOT'
|
||||||
compile 'de.themoep:minedown-adventure:1.6.1-SNAPSHOT'
|
compile 'de.themoep:minedown-adventure:1.6.1-SNAPSHOT'
|
||||||
|
|
||||||
|
// Databases
|
||||||
compile 'co.aikar:idb-bukkit:1.0.0-SNAPSHOT'
|
compile 'co.aikar:idb-bukkit:1.0.0-SNAPSHOT'
|
||||||
compile 'com.zaxxer:HikariCP:2.4.1'
|
compile 'com.zaxxer:HikariCP:2.4.1'
|
||||||
|
|
||||||
|
// Messaging
|
||||||
compile 'io.github.leonardosnt:bungeechannelapi:1.0.0-SNAPSHOT'
|
compile 'io.github.leonardosnt:bungeechannelapi:1.0.0-SNAPSHOT'
|
||||||
compile 'io.lettuce:lettuce-core:6.0.0.M1'
|
compile 'io.lettuce:lettuce-core:6.0.0.M1'
|
||||||
|
|
||||||
|
// Commands
|
||||||
compileOnly "dev.jorel:commandapi-core:4.0"
|
compileOnly "dev.jorel:commandapi-core:4.0"
|
||||||
|
|
||||||
|
// Plugins
|
||||||
compileOnly 'com.gmail.nossr50.mcMMO:mcMMO:2.1.143'
|
compileOnly 'com.gmail.nossr50.mcMMO:mcMMO:2.1.143'
|
||||||
compileOnly 'com.github.TownyAdvanced:Towny:0.96.2.0'
|
compileOnly 'com.github.TownyAdvanced:Towny:0.96.2.0'
|
||||||
compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.4-SNAPSHOT'
|
compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.4-SNAPSHOT'
|
||||||
|
|
||||||
compileOnly 'me.clip:placeholderapi:2.10.9'
|
compileOnly 'me.clip:placeholderapi:2.10.9'
|
||||||
compileOnly 'com.github.TownyAdvanced:Towny:0.96.1.11'
|
compileOnly 'com.github.TownyAdvanced:Towny:0.96.1.11'
|
||||||
compileOnly 'com.github.MilkBowl:VaultAPI:1.7'
|
compileOnly 'com.github.MilkBowl:VaultAPI:1.7'
|
||||||
compileOnly 'com.vexsoftware:nuvotifier-universal:2.6.0'
|
compileOnly 'com.vexsoftware:nuvotifier-universal:2.6.0'
|
||||||
compileOnly 'net.luckperms:api:5.1'
|
compileOnly 'net.luckperms:api:5.1'
|
||||||
|
|
||||||
|
// Util
|
||||||
compileOnly 'org.jetbrains:annotations:16.0.1'
|
compileOnly 'org.jetbrains:annotations:16.0.1'
|
||||||
|
|
||||||
|
// Server
|
||||||
|
compileOnly 'com.destroystokyo.paper:paper-api:1.16.2-R0.1-SNAPSHOT'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Generates plugin.yml automatically
|
||||||
bukkit {
|
bukkit {
|
||||||
name = project.description
|
name = project.description
|
||||||
version = project.version
|
version = project.version
|
||||||
@@ -82,6 +93,7 @@ bukkit {
|
|||||||
|
|
||||||
sourceCompatibility = '1.8'
|
sourceCompatibility = '1.8'
|
||||||
|
|
||||||
|
// Set output directory and encoding
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
options.encoding = 'UTF-8'
|
options.encoding = 'UTF-8'
|
||||||
}
|
}
|
||||||
@@ -90,8 +102,10 @@ tasks.withType(Jar) {
|
|||||||
getDestinationDirectory().set(file("$rootDir/build"))
|
getDestinationDirectory().set(file("$rootDir/build"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Automatically shadowJar when building
|
||||||
tasks.build.dependsOn tasks.shadowJar
|
tasks.build.dependsOn tasks.shadowJar
|
||||||
|
|
||||||
|
// Output a single jar
|
||||||
shadowJar {
|
shadowJar {
|
||||||
minimize()
|
minimize()
|
||||||
archiveFileName.set(project.description + "-" + project.property('projectVersion') + ".jar")
|
archiveFileName.set(project.description + "-" + project.property('projectVersion') + ".jar")
|
||||||
@@ -101,6 +115,7 @@ jar {
|
|||||||
archiveFileName.set(project.description + "-" + project.property('projectVersion') + ".jar")
|
archiveFileName.set(project.description + "-" + project.property('projectVersion') + ".jar")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Automatically relocate all shaded dependencies
|
||||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
|
||||||
|
|
||||||
task relocateShadowJar(type: ConfigureShadowRelocation) {
|
task relocateShadowJar(type: ConfigureShadowRelocation) {
|
||||||
@@ -110,6 +125,7 @@ task relocateShadowJar(type: ConfigureShadowRelocation) {
|
|||||||
|
|
||||||
tasks.shadowJar.dependsOn tasks.relocateShadowJar
|
tasks.shadowJar.dependsOn tasks.relocateShadowJar
|
||||||
|
|
||||||
|
// Cleanup custom output directory on clean task
|
||||||
clean.doFirst {
|
clean.doFirst {
|
||||||
delete "$rootDir/build/bundled"
|
delete "$rootDir/build/bundled"
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user