dynmap/forge-1.12.2/build.gradle

143 lines
4.9 KiB
Groovy
Raw Normal View History

buildscript {
repositories {
2022-02-21 21:32:14 +01:00
mavenCentral()
maven { url = "https://repo.spongepowered.org/maven" }
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
2020-04-26 01:51:11 +02:00
apply plugin: 'com.github.johnrengelman.shadow'
2022-02-07 17:04:12 +01:00
apply plugin: 'eclipse'
2024-04-29 22:06:37 +02:00
sourceSets {
main.java.srcDirs = ['src/main/java', '../DynmapCore/src/main/java', '../DynmapCoreAPI/src/main/java']
main.resources.srcDirs = ['src/main/resources', '../DynmapCore/src/main/resources', '../DynmapCoreAPI/src/main/resources']
}
2022-02-07 17:04:12 +01:00
eclipse {
project {
2022-02-21 21:32:14 +01:00
name = "Dynmap(Forge-Legacy-1.12.2)"
2022-02-07 17:04:12 +01:00
}
}
dependencies {
2024-04-29 22:06:37 +02:00
implementation 'javax.servlet:javax.servlet-api:3.1'
implementation'org.eclipse.jetty:jetty-server:9.4.26.v20200117'
implementation 'org.eclipse.jetty:jetty-servlet:9.4.26.v20200117'
implementation 'com.googlecode.json-simple:json-simple:1.1.1'
implementation 'org.yaml:snakeyaml:1.23' // DON'T UPDATE - NEWER ONE TRIPS ON WINDOWS ENCODED FILES
implementation 'com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:20180219.1'
implementation 'org.postgresql:postgresql:42.2.18'
implementation 'io.github.linktosriram.s3lite:core:0.0.2-SNAPSHOT'
implementation 'io.github.linktosriram.s3lite:api:0.0.2-SNAPSHOT'
implementation 'io.github.linktosriram.s3lite:http-client-url-connection:0.0.2-SNAPSHOT'
implementation 'io.github.linktosriram.s3lite:http-client-spi:0.0.2-SNAPSHOT'
implementation 'io.github.linktosriram.s3lite:util:0.0.2-SNAPSHOT'
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:3.0.1'
implementation 'com.sun.xml.bind:jaxb-impl:3.0.0'
implementation 'com.googlecode.json-simple:json-simple:1.1.1'
implementation 'org.yaml:snakeyaml:1.23'
implementation 'org.spongepowered:spongeapi:7.0.0'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
ext.buildNumber = System.getenv().BUILD_NUMBER ?: "Dev"
repositories {
2022-02-21 21:32:14 +01:00
mavenCentral() // Maven Central
maven { url = 'https://repo.spongepowered.org/maven' } // SpongePowered
maven { url = 'https://jitpack.io/' } // JitPack
}
2022-02-21 21:32:14 +01:00
minecraft {
2022-02-21 21:32:14 +01:00
version = "1.12.2-14.23.5.2847"
mappings = "snapshot_20180814"
runDir = 'run'
2018-09-04 02:09:37 +02:00
replaceIn "Version.java"
replace "@VERSION@", project.version + '-' + project.ext.buildNumber
replace "@BUILD_NUMBER@", project.ext.buildNumber
}
project.archivesBaseName = "${project.archivesBaseName}-forge-1.12.2"
2024-04-29 22:06:37 +02:00
processResources {
// replace stuff in mcmod.info, nothing else
2024-04-29 22:06:37 +02:00
filesMatching([
'core.yml',
'lightings.txt',
'perspectives.txt',
'shaders.txt',
'mcmod.info',
'extracted/web/version.js',
'extracted/web/index.html',
'extracted/web/login.html'
]) {
// replace version and mcversion
expand(
2024-04-29 22:06:37 +02:00
buildnumber: project.parent.ext.globals.buildNumber,
version: project.version,
mcversion: "1.12.2"
2024-04-29 22:06:37 +02:00
)
}
}
shadowJar {
dependencies {
2024-04-29 22:06:37 +02:00
include(dependency('com.googlecode.json-simple:json-simple:'))
include(dependency('org.yaml:snakeyaml:'))
include(dependency('com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:'))
include(dependency('javax.servlet::'))
include(dependency('org.eclipse.jetty::'))
include(dependency('org.eclipse.jetty.orbit:javax.servlet:'))
include(dependency('org.postgresql:postgresql:'))
include(dependency('io.github.linktosriram.s3lite:core:'))
include(dependency('io.github.linktosriram.s3lite:api:'))
include(dependency('io.github.linktosriram.s3lite:http-client-url-connection:'))
include(dependency('io.github.linktosriram.s3lite:http-client-spi:'))
include(dependency('io.github.linktosriram.s3lite:util:'))
include(dependency('jakarta.xml.bind::'))
include(dependency('com.sun.xml.bind::'))
exclude("META-INF/maven/**")
exclude("META-INF/services/**")
}
relocate('org.json.simple', 'org.dynmap.json.simple')
relocate('org.yaml.snakeyaml', 'org.dynmap.snakeyaml')
relocate('org.eclipse.jetty', 'org.dynmap.jetty')
relocate('org.owasp.html', 'org.dynmap.org.owasp.html')
relocate('javax.servlet', 'org.dynmap.javax.servlet' )
relocate('org.postgresql', 'org.dynmap.org.postgresql')
relocate('io.github.linktosriram.s3lite', 'org.dynmap.s3lite')
archiveName = "Dynmap-${parent.version}-forge-1.12.2.jar"
destinationDir = file '../target'
2020-04-26 01:51:11 +02:00
manifest {
attributes 'FMLAT': 'dynmap_at.cfg'
}
}
shadowJar.doLast {
task ->
ant.checksum file: task.archivePath
}
reobf {
shadowJar {
mappingType = 'SEARGE'
}
}
task deobfJar(type: Jar) {
from sourceSets.main.output
classifier = 'dev'
}
artifacts {
archives deobfJar
}
build.dependsOn(shadowJar)