Edit: relocations & excludes;

Refactoring modules configuration;
feat/data-edit-commands
Harvels X 3 years ago
parent 6ea8cdb75c
commit 3c50245540
No known key found for this signature in database
GPG Key ID: 9637BCFE856BB8F3

@ -1,10 +1,11 @@
//file:noinspection GroovyAssignabilityCheck
plugins { plugins {
id 'java-library' id 'java-library'
id 'maven-publish' id 'maven-publish'
} }
dependencies { dependencies {
implementation project(':common') compileOnly project(path: ':common', configuration: 'shadow')
compileOnly 'org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT' compileOnly 'org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT'
compileOnly 'org.jetbrains:annotations:22.0.0' compileOnly 'org.jetbrains:annotations:22.0.0'

@ -1,9 +1,7 @@
dependencies { dependencies {
compileOnly project(':common') implementation project(':api')
compileOnly project(':api')
implementation project(path: ':common', configuration: 'shadow') implementation project(path: ':common', configuration: 'shadow')
compileOnly 'redis.clients:jedis:3.7.1'
implementation 'org.bstats:bstats-bukkit:2.2.1' implementation 'org.bstats:bstats-bukkit:2.2.1'
implementation 'de.themoep:minedown:1.7.1-SNAPSHOT' implementation 'de.themoep:minedown:1.7.1-SNAPSHOT'
@ -13,8 +11,9 @@ dependencies {
} }
shadowJar { shadowJar {
relocate 'org.bstats', 'me.William278.husksync.libraries.bstats.bukkit' relocate 'de.themoep', 'me.william278.husksync.libraries'
relocate 'de.themoep', 'me.William278.husksync.libraries.minedown.standard' relocate 'org.bstats', 'me.william278.husksync.libraries.bstats'
}
tasks.register('prepareKotlinBuildScriptModel'){} relocate 'redis.clients', 'me.william278.husksync.libraries'
relocate 'org.apache', 'me.william278.husksync.libraries'
}

@ -1,8 +1,7 @@
dependencies { dependencies {
compileOnly project(':common')
implementation project(path: ':common', configuration: 'shadow') implementation project(path: ':common', configuration: 'shadow')
compileOnly 'redis.clients:jedis:4.0.1' implementation 'com.zaxxer:HikariCP:5.0.1'
implementation 'org.bstats:bstats-bungeecord:2.2.1' implementation 'org.bstats:bstats-bungeecord:2.2.1'
implementation 'de.themoep:minedown:1.7.1-SNAPSHOT' implementation 'de.themoep:minedown:1.7.1-SNAPSHOT'
implementation 'net.byteflux:libby-bungee:1.1.5' implementation 'net.byteflux:libby-bungee:1.1.5'
@ -11,10 +10,17 @@ dependencies {
} }
shadowJar { shadowJar {
relocate 'com.zaxxer', 'me.William278.husksync.libraries.hikari' relocate 'de.themoep', 'me.william278.husksync.libraries'
relocate 'org.bstats', 'me.William278.husksync.libraries.bstats.bungee' relocate 'net.byteflux', 'me.william278.husksync.libraries'
relocate 'de.themoep', 'me.William278.husksync.libraries.minedown.standard' relocate 'org.bstats', 'me.william278.husksync.libraries.bstats'
relocate 'net.byteflux', 'me.William278.husksync.libraries.libby.bungee'
} relocate 'redis.clients', 'me.william278.husksync.libraries'
relocate 'org.apache', 'me.william278.husksync.libraries'
tasks.register('prepareKotlinBuildScriptModel'){} relocate 'com.zaxxer', 'me.william278.husksync.libraries'
dependencies {
//noinspection GroovyAssignabilityCheck
exclude dependency(':slf4j-api')
}
}

@ -1,28 +1,7 @@
dependencies { dependencies {
implementation 'redis.clients:jedis:4.0.1' compileOnly 'com.zaxxer:HikariCP:5.0.1'
implementation 'com.zaxxer:HikariCP:5.0.1'
}
import org.apache.tools.ant.filters.ReplaceTokens
task updateVersion(type: Copy) {
from('src/main/resources') {
include 'plugin.yml'
include 'bungee.yml'
}
into 'build/sources/resources/'
filter(ReplaceTokens, tokens: [version: '' + project.version])
}
processResources {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
dependsOn updateVersion
from 'build/sources/resources'
} }
shadowJar { shadowJar {
dependsOn processResources relocate 'com.zaxxer', 'me.william278.husksync.libraries'
// Exclude some unnecessary files
exclude "**/module-info.class"
exclude "module-info.class"
} }

@ -1,30 +1,27 @@
//file:noinspection GroovyAssignabilityCheck
plugins {
id 'maven-publish'
}
dependencies { dependencies {
implementation project(path: ":common", configuration: 'shadow') implementation project(path: ':bukkit', configuration: 'shadow')
implementation project(path: ":api", configuration: 'shadow') implementation project(path: ':bungeecord', configuration: 'shadow')
implementation project(path: ":bukkit", configuration: 'shadow') implementation project(path: ':velocity', configuration: 'shadow')
implementation project(path: ":bungeecord", configuration: 'shadow')
implementation project(path: ":velocity", configuration: 'shadow')
} }
shadowJar { shadowJar {
// Relocations dependencies {
relocate 'redis.clients', 'me.William278.husksync.libraries.jedis' exclude dependency(':jedis')
exclude dependency(':commons-pool2')
destinationDirectory.set(file("$rootDir/target/"))
archiveBaseName.set('HuskSync')
archiveClassifier.set('')
build {
dependsOn tasks.named("shadowJar")
} }
} }
publishing { publishing {
publications { publications {
mavenJava(MavenPublication) { mavenJava(MavenPublication) {
groupId = 'me.William278' groupId = 'me.william278'
artifactId = 'HuskSync-plugin' artifactId = 'husksync-plugin'
version = "$project.version" version = "$rootProject.version"
artifact shadowJar artifact shadowJar
} }

@ -1,21 +1,26 @@
dependencies { dependencies {
compileOnly project(':common')
implementation project(path: ':common', configuration: 'shadow') implementation project(path: ':common', configuration: 'shadow')
compileOnly 'redis.clients:jedis:4.0.1' implementation 'com.zaxxer:HikariCP:5.0.1'
implementation 'org.bstats:bstats-velocity:2.2.1' implementation 'org.bstats:bstats-velocity:2.2.1'
implementation 'de.themoep:minedown-adventure:1.7.1-SNAPSHOT' implementation 'de.themoep:minedown-adventure:1.7.1-SNAPSHOT'
implementation 'net.byteflux:libby-velocity:1.1.5' implementation 'net.byteflux:libby-velocity:1.1.5'
compileOnly 'com.velocitypowered:velocity-api:3.1.0' compileOnly 'com.velocitypowered:velocity-api:3.1.0'
annotationProcessor 'com.velocitypowered:velocity-api:3.1.0'
} }
shadowJar { shadowJar {
relocate 'com.zaxxer', 'me.William278.husksync.libraries.hikari' relocate 'de.themoep', 'me.william278.husksync.libraries'
relocate 'org.bstats', 'me.William278.husksync.libraries.bstats.velocity' relocate 'net.byteflux', 'me.william278.husksync.libraries'
relocate 'de.themoep', 'me.William278.husksync.libraries.minedown.adventure' relocate 'org.bstats', 'me.william278.husksync.libraries.bstats'
relocate 'net.byteflux', 'me.William278.husksync.libraries.libby.velocity'
} relocate 'redis.clients', 'me.william278.husksync.libraries'
relocate 'org.apache', 'me.william278.husksync.libraries'
tasks.register('prepareKotlinBuildScriptModel'){} relocate 'com.zaxxer', 'me.william278.husksync.libraries'
dependencies {
//noinspection GroovyAssignabilityCheck
exclude dependency(':slf4j-api')
}
}
Loading…
Cancel
Save