dynmap/forge-1.12.2/build.gradle

103 lines
2.4 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'
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 {
implementation project(path: ":DynmapCore", configuration: "shadow")
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"
processResources
{
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
expand(
version: project.version + '-' + project.ext.buildNumber,
mcversion: "1.12.2"
)
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
// Move access transformer to META-INF
rename '(.+_at.cfg)', 'META-INF/$1'
}
shadowJar {
dependencies {
include(dependency(':DynmapCore'))
2020-04-26 01:51:11 +02:00
}
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)