Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Commit

Permalink
Fix format and exclude signature files from jar
Browse files Browse the repository at this point in the history
  • Loading branch information
LeStegii committed Oct 17, 2022
1 parent b528598 commit 01af88a
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import org.apache.tools.ant.filters.ReplaceTokens
apply plugin: 'java-library'
apply plugin: 'java'

libsDirName = System.getenv("libsDirName") == null ? libsDirName : System.getenv("libsDirName")
libsDirName = System.getenv('libsDirName') == null ? libsDirName : System.getenv('libsDirName')
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
compileJava.options.encoding = 'UTF-8'

// First number indicates breaking changes (removals etc.)
// Second number indicates non-breaking changes (new libraries etc.)
// Third number indicates bug fixes or small updates
version = "1.3.0"
version = '1.3.1'

sourceSets {
main {
Expand Down Expand Up @@ -43,7 +43,7 @@ repositories {
}

maven {
url = "https://oss.sonatype.org/content/repositories/snapshots/"
url = 'https://oss.sonatype.org/content/repositories/snapshots/'
}

maven {
Expand All @@ -69,22 +69,22 @@ configurations {
}

dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.2")
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.7.2")
testImplementation('org.junit.jupiter:junit-jupiter-api:5.7.2')
testImplementation('org.junit.jupiter:junit-jupiter-engine:5.7.2')

// Internal Libraries
this.addModularInternal('com.googlecode.json-simple:json-simple:1.1.1', 'gson', false)
this.addModularInternal('net.dv8tion:JDA:5.0.0-alpha.4', 'jda', false)
this.addModularInternal('com.github.CuukyOfficial:CFW:master-SNAPSHOT', 'CFW', true)
this.addModularInternal('com.github.KettleMC-Network:Konfiguration:2.0.1', 'konfiguration', true)
this.addModularInternal('com.github.KettleMC-Network:Konfiguration:2.0.2', 'konfiguration', true)
this.addModularInternal('com.github.almighty-satan:jo2sql:1.2.2', 'jo2sql', true)
this.addModularInternal('net.kyori:adventure-text-minimessage:4.11.0', 'minimessages', false)
this.addModularInternal("com.oracle.ojdbc:ojdbc8:19.3.0.0", "ojdbc", false)
this.addModularInternal("mysql:mysql-connector-java:8.0.28", "mysql-connector", false)
this.addModularInternal('com.oracle.ojdbc:ojdbc8:19.3.0.0', 'ojdbc', false)
this.addModularInternal('mysql:mysql-connector-java:8.0.28', 'mysql-connector', false)

// Velocity + Spigot Support
annotationProcessor 'com.velocitypowered:velocity-api:3.0.1'
this.addModularCompile("com.velocitypowered:velocity-api:3.0.1", "velocity", true)
this.addModularCompile('com.velocitypowered:velocity-api:3.0.1', 'velocity', true)
this.addModularCompile('org.spigotmc:spigot-api:1.8.8-R0.1-SNAPSHOT', 'spigot', true)
}

Expand All @@ -107,6 +107,12 @@ void addModularInternal(String repoName, String fileName, boolean changingB) {
}

jar {

exclude('META-INF/*.RSA')
exclude('META-INF/*.DSA')
exclude('META-INF/*.SF')
exclude('META-INF/signature.bin')

manifest {
attributes(
'Manifest-Version': version,
Expand All @@ -126,10 +132,10 @@ jar {
processResources {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
from (sourceSets.main.resources.srcDirs) {
filter ReplaceTokens, tokens: [name: "LibrariesBukkit"]
filter ReplaceTokens, tokens: [name: 'LibrariesBukkit']
filter ReplaceTokens, tokens: [version: version]
filter ReplaceTokens, tokens: [author: "KettleMC"]
filter ReplaceTokens, tokens: [main: "net.kettlemc.libraries.Libraries"]
filter ReplaceTokens, tokens: [author: 'KettleMC']
filter ReplaceTokens, tokens: [main: 'net.kettlemc.libraries.Libraries']
}
}

Expand Down

0 comments on commit 01af88a

Please sign in to comment.