mirror of
https://github.com/LegacyModdingMC/UniMixins.git
synced 2026-11-20 04:19:38 +00:00
110 lines
2.4 KiB
Groovy
110 lines
2.4 KiB
Groovy
/** The root of the build. Exposed for flexibility, but you shouldn't edit it
|
|
unless you have to. Edit project.gradle instead. */
|
|
|
|
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
maven {
|
|
name = "forge"
|
|
url = "https://maven.minecraftforge.net/"
|
|
}
|
|
maven {
|
|
url = "https://jitpack.io"
|
|
}
|
|
}
|
|
dependencies {
|
|
classpath 'com.github.GTNewHorizons:ForgeGradle:1.2.11'
|
|
}
|
|
}
|
|
|
|
plugins {
|
|
id 'com.github.johnrengelman.shadow' version '6.1.0' apply false
|
|
}
|
|
|
|
allprojects {
|
|
apply plugin: 'com.github.johnrengelman.shadow'
|
|
apply plugin: 'maven-publish'
|
|
// For some reason this is needed when using Gradle 6.9 (but not if using 4.4.1)
|
|
repositories {
|
|
maven {
|
|
name 'Overmind forge repo mirror'
|
|
url 'https://gregtech.overminddl1.com/'
|
|
}
|
|
mavenLocal()
|
|
maven {
|
|
name = 'sponge'
|
|
url = 'https://repo.spongepowered.org/maven/'
|
|
}
|
|
maven {
|
|
url = "https://mvn.falsepattern.com/releases"
|
|
}
|
|
maven {
|
|
name = "GTNH Maven"
|
|
url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
|
|
allowInsecureProtocol = true
|
|
}
|
|
maven {
|
|
url 'https://jitpack.io'
|
|
}
|
|
}
|
|
|
|
apply from: "${project.rootDir}/buildscript/forge-1.7.gradle"
|
|
|
|
if(project.name.startsWith("module-") && project.name != "module-mixin" && project.name != "module-common") {
|
|
if(project.name != "module-all") {
|
|
task sourcesJar(type: Jar) {
|
|
from sourceSets.main.allSource
|
|
classifier = 'sources'
|
|
}
|
|
}
|
|
|
|
afterEvaluate {
|
|
task devJar(type: Jar) {
|
|
classifier = 'dev'
|
|
def jarTask = (jar.enabled ? jar : shadowJar)
|
|
from zipTree(jarTask.getOutputs().getFiles().getSingleFile())
|
|
manifest = jarTask.manifest
|
|
|
|
dependsOn jarTask
|
|
}
|
|
|
|
reobf.dependsOn devJar
|
|
|
|
artifacts {
|
|
archives tasks."sourcesJar"
|
|
archives tasks."devJar"
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
create("maven", MavenPublication) {
|
|
artifact jar.enabled ? jar : shadowJar
|
|
artifact source: tasks."sourcesJar", classifier: 'sources'
|
|
artifact source: tasks."devJar", classifier: 'dev'
|
|
artifactId = archivesBaseName
|
|
version = jar.version
|
|
}
|
|
}
|
|
}
|
|
|
|
project.tasks.forEach {
|
|
if(it.name.startsWith("publish") && it.name.contains("PublicationTo")) {
|
|
it.dependsOn reobf
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Put license, credits and readme in jar
|
|
|
|
delete "$projectDir/build/tmp/license"
|
|
|
|
copy {
|
|
from "$projectDir"
|
|
into "$projectDir/build/tmp/license"
|
|
include "CREDITS", "LICENSE*", "README*"
|
|
}
|
|
|
|
sourceSets.main.resources.srcDir("build/tmp/license")
|
|
}
|