Arclight/arclight-forge-1.14/build.gradle

122 lines
4.1 KiB
Groovy
Raw Normal View History

2020-05-16 06:22:29 +00:00
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
maven { url = 'https://repo.spongepowered.org/maven' }
jcenter()
mavenCentral()
maven { url = 'https://jitpack.io' }
2020-05-16 06:22:29 +00:00
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
classpath 'com.github.IzzelAliz:arclight-gradle-plugin:1.3'
2020-05-16 06:22:29 +00:00
}
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'org.spongepowered.mixin'
apply plugin: 'java'
2020-05-17 08:04:37 +00:00
apply plugin: 'idea'
apply plugin: 'io.izzel.arclight'
2020-05-16 06:22:29 +00:00
2020-05-21 02:33:47 +00:00
ext {
minecraftVersion = '1.14.4'
forgeVersion = '28.2.0'
}
arclight {
mcVersion = minecraftVersion
forgeVersion = project.ext.forgeVersion
bukkitVersion = 'v1_14_R1'
2020-05-29 11:57:19 +00:00
wipeVersion = true
reobfVersion = true
2020-05-21 02:33:47 +00:00
}
2020-05-16 06:22:29 +00:00
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
configurations {
embed
compile.extendsFrom(embed)
2020-05-16 06:22:29 +00:00
}
minecraft {
2020-05-21 02:33:47 +00:00
mappings channel: 'stable', version: "58-$minecraftVersion"
accessTransformer = project(':arclight-common').file('src/main/resources/META-INF/accesstransformer.cfg')
2020-05-16 06:22:29 +00:00
}
repositories {
jcenter()
maven {
name = 'sponge-repo'
url = 'https://repo.spongepowered.org/maven'
}
maven { url = 'https://oss.sonatype.org/content/repositories/snapshots/' }
maven { url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
maven { url = 'https://repo.codemc.io/repository/nms/' }
maven { url = 'https://files.minecraftforge.net/maven/' }
}
def embedLibs = ['org.spongepowered:mixin:0.8', 'org.ow2.asm:asm-util:6.2',
'org.ow2.asm:asm-analysis:6.2', 'org.yaml:snakeyaml:1.23',
2020-05-21 02:33:47 +00:00
'org.xerial:sqlite-jdbc:3.28.0', 'mysql:mysql-connector-java:5.1.47',
'commons-lang:commons-lang:2.6', 'com.googlecode.json-simple:json-simple:1.1.1',
'org.apache.logging.log4j:log4j-jul:2.11.2', 'net.md-5:SpecialSource:1.8.6',
'net.minecraftforge:eventbus:2.0.0-milestone.1:service', 'org.jline:jline-terminal-jansi:3.12.1',
'org.fusesource.jansi:jansi:1.18', 'org.jline:jline-terminal:3.12.1',
'org.jline:jline-reader:3.12.1', 'jline:jline:2.12.1']
2020-05-16 06:22:29 +00:00
dependencies {
2020-05-21 02:33:47 +00:00
minecraft "net.minecraftforge:forge:$minecraftVersion-$forgeVersion"
2020-05-16 06:22:29 +00:00
compile group: 'org.jetbrains', name: 'annotations', version: '19.0.0'
compile project(':arclight-common')
2020-05-21 02:33:47 +00:00
embed project(':forge-installer')
2020-05-16 06:22:29 +00:00
for (def lib : embedLibs) {
arclight lib
2020-05-16 06:22:29 +00:00
}
2020-05-21 02:33:47 +00:00
embed 'net.md-5:bungeecord-chat:1.13-SNAPSHOT@jar'
embed "org.spigotmc:spigot-api:$minecraftVersion-R0.1-SNAPSHOT@jar"
2020-05-16 06:22:29 +00:00
}
def getGitHash = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-parse', '--short', 'HEAD'
standardOutput = stdout
}
return stdout.toString().trim()
}
processResources {
filesMatching("**/mods.toml") {
2020-05-21 02:33:47 +00:00
expand 'version': "$minecraftVersion-${project.version}-${getGitHash()}"
2020-05-16 06:22:29 +00:00
}
}
jar {
manifest.attributes 'MixinConnector': 'io.izzel.arclight.common.mod.ArclightConnector'
2020-05-16 06:22:29 +00:00
manifest.attributes 'Main-Class': 'io.izzel.arclight.server.Main'
manifest.attributes 'Implementation-Title': 'Arclight'
manifest.attributes 'Implementation-Version': "arclight-${project.version}-${getGitHash()}"
manifest.attributes 'Implementation-Vendor': 'Arclight Team'
from(configurations.embed.collect { it.isDirectory() ? it : zipTree(it) }) {
exclude "META-INF/MANIFEST.MF"
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
exclude "LICENSE.txt"
}
from(project(':arclight-common').tasks.jar.outputs.files.collect { it.isDirectory() ? it : zipTree(it) })
2020-05-16 06:22:29 +00:00
}
remapSpigotJar {
includes.add('net/minecraft/block/ChestBlock$DoubleInventory')
2020-05-21 02:33:47 +00:00
}
2020-05-16 06:22:29 +00:00
mixin {
//add sourceSets.main, 'mixins.arclight.refmap.json'
2020-05-16 06:22:29 +00:00
}
compileJava {
options.compilerArgs << '-XDignore.symbol.file' << '-XDenableSunApiLintControl'
2020-05-16 06:51:43 +00:00
options.encoding = 'UTF-8'
2020-05-16 06:22:29 +00:00
}