2018-11-05 09:54:00 -05:00
|
|
|
plugins {
|
|
|
|
id 'java'
|
|
|
|
id 'eclipse'
|
|
|
|
id 'idea'
|
2019-04-22 11:12:05 -04:00
|
|
|
id 'maven-publish'
|
2019-05-10 19:02:20 -04:00
|
|
|
id 'fabric-loom' version '0.2.3-SNAPSHOT' apply false
|
2019-04-26 14:18:20 -04:00
|
|
|
id 'net.minecrell.licenser' version '0.4.1'
|
2019-04-23 18:48:31 -04:00
|
|
|
// id 'com.matthewprenger.cursegradle' version "1.1.2"
|
2018-11-05 09:54:00 -05:00
|
|
|
}
|
|
|
|
|
2019-04-23 18:46:23 -04:00
|
|
|
def ENV = System.getenv()
|
2018-11-05 09:54:00 -05:00
|
|
|
|
2019-04-23 18:48:31 -04:00
|
|
|
def baseVersion = "0.3.0-pre"
|
2019-04-23 18:51:01 -04:00
|
|
|
def mcVersion = "1.14"
|
2018-11-05 09:54:00 -05:00
|
|
|
|
2019-04-23 18:46:23 -04:00
|
|
|
allprojects {
|
|
|
|
apply plugin: 'maven-publish'
|
|
|
|
apply plugin: 'fabric-loom'
|
2019-04-26 14:18:20 -04:00
|
|
|
apply plugin: 'net.minecrell.licenser'
|
2018-12-14 13:48:37 -05:00
|
|
|
|
2019-04-23 18:46:23 -04:00
|
|
|
sourceCompatibility = 1.8
|
|
|
|
targetCompatibility = 1.8
|
2018-11-05 09:54:00 -05:00
|
|
|
|
2019-04-24 13:15:08 -04:00
|
|
|
group = "net.fabricmc.fabric-api"
|
|
|
|
|
2019-04-23 18:46:23 -04:00
|
|
|
dependencies {
|
|
|
|
minecraft "com.mojang:minecraft:$mcVersion"
|
2019-04-23 18:51:01 -04:00
|
|
|
mappings "net.fabricmc:yarn:$mcVersion+build.1"
|
2019-04-23 18:46:23 -04:00
|
|
|
modCompile "net.fabricmc:fabric-loader:0.4.2+build.131"
|
|
|
|
}
|
2018-12-09 11:47:35 -05:00
|
|
|
|
2019-04-23 18:46:23 -04:00
|
|
|
configurations {
|
|
|
|
dev
|
|
|
|
}
|
2018-11-05 09:54:00 -05:00
|
|
|
|
2019-04-23 18:46:23 -04:00
|
|
|
repositories {
|
|
|
|
mavenLocal()
|
|
|
|
}
|
|
|
|
|
|
|
|
afterEvaluate {
|
|
|
|
artifacts {
|
2019-05-10 19:02:20 -04:00
|
|
|
dev file: file("${project.buildDir}/libs/$archivesBaseName-${version}-dev.jar"), type: "jar", builtBy: jar
|
2019-04-23 18:46:23 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
processResources {
|
|
|
|
inputs.property "version", project.version
|
|
|
|
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
|
|
include "fabric.mod.json"
|
|
|
|
expand "version": project.version
|
|
|
|
}
|
|
|
|
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
|
|
exclude "fabric.mod.json"
|
|
|
|
}
|
|
|
|
}
|
2019-04-26 14:18:20 -04:00
|
|
|
|
|
|
|
license {
|
|
|
|
println(rootProject.file('HEADER'))
|
|
|
|
header rootProject.file('HEADER')
|
|
|
|
include '**/*.java'
|
|
|
|
}
|
2019-04-23 18:46:23 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
|
|
|
classifier = 'sources'
|
|
|
|
from sourceSets.main.allSource
|
|
|
|
}
|
2018-12-22 10:21:31 -05:00
|
|
|
}
|
|
|
|
|
2019-04-23 18:46:23 -04:00
|
|
|
subprojects {
|
|
|
|
task remapMavenJar(type: Copy, dependsOn: remapJar) {
|
|
|
|
afterEvaluate {
|
|
|
|
from("${project.buildDir}/libs/$archivesBaseName-${version}.jar")
|
|
|
|
into("${project.buildDir}/libs/")
|
|
|
|
rename { String fn -> "$archivesBaseName-${version}-maven.jar" }
|
|
|
|
}
|
|
|
|
}
|
2019-04-23 19:14:43 -04:00
|
|
|
|
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
mavenJava(MavenPublication) {
|
|
|
|
artifact(file("${project.buildDir}/libs/$archivesBaseName-${version}-maven.jar")) {
|
|
|
|
builtBy remapMavenJar
|
|
|
|
}
|
|
|
|
artifact(sourcesJar) {
|
|
|
|
builtBy remapSourcesJar
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
url "http://mavenupload.modmuss50.me/"
|
|
|
|
if (project.hasProperty('mavenPass')) {
|
|
|
|
credentials {
|
|
|
|
username 'buildslave'
|
|
|
|
password project.getProperty('mavenPass')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-23 18:46:23 -04:00
|
|
|
}
|
2019-04-03 15:34:09 -04:00
|
|
|
|
2019-05-10 19:02:20 -04:00
|
|
|
task remapMavenJar(type: net.fabricmc.loom.task.RemapJarTask, dependsOn: jar) {
|
2019-04-23 18:46:23 -04:00
|
|
|
afterEvaluate {
|
2019-05-10 19:02:20 -04:00
|
|
|
input = file("${project.buildDir}/libs/${archivesBaseName}-${version}-dev.jar")
|
|
|
|
output = file("${project.buildDir}/libs/${archivesBaseName}-${version}-maven.jar")
|
|
|
|
addNestedDependencies = false
|
2019-04-03 15:34:09 -04:00
|
|
|
}
|
2019-04-23 18:46:23 -04:00
|
|
|
}
|
2019-04-03 15:34:09 -04:00
|
|
|
|
2019-04-23 18:46:23 -04:00
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
mavenJava(MavenPublication) {
|
2019-04-23 19:14:43 -04:00
|
|
|
artifact(file("${project.buildDir}/libs/$archivesBaseName-${version}-maven.jar")) {
|
|
|
|
builtBy remapMavenJar
|
|
|
|
}
|
|
|
|
artifact(sourcesJar) {
|
|
|
|
builtBy remapSourcesJar
|
|
|
|
}
|
2019-04-23 18:46:23 -04:00
|
|
|
pom.withXml {
|
|
|
|
def depsNode = asNode().appendNode("dependencies")
|
|
|
|
subprojects.each {
|
|
|
|
def depNode = depsNode.appendNode("dependency")
|
|
|
|
depNode.appendNode("groupId", it.group)
|
|
|
|
depNode.appendNode("artifactId", it.name)
|
2019-04-26 14:18:20 -04:00
|
|
|
depNode.appendNode("version", it.version)
|
2019-04-23 18:46:23 -04:00
|
|
|
depNode.appendNode("scope", "compile")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-04-03 15:34:09 -04:00
|
|
|
}
|
2019-04-23 19:14:43 -04:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
url "http://mavenupload.modmuss50.me/"
|
|
|
|
if (project.hasProperty('mavenPass')) {
|
|
|
|
credentials {
|
|
|
|
username 'buildslave'
|
|
|
|
password project.getProperty('mavenPass')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-04-03 15:34:09 -04:00
|
|
|
}
|
|
|
|
|
2019-04-26 14:18:20 -04:00
|
|
|
task licenseFormatAll
|
|
|
|
subprojects { p -> licenseFormatAll.dependsOn("${p.path}:licenseFormat") }
|
|
|
|
|
2019-04-23 18:46:23 -04:00
|
|
|
dependencies {
|
|
|
|
afterEvaluate {
|
|
|
|
subprojects.each {
|
|
|
|
compile project(path: ":${it.name}", configuration: "dev")
|
|
|
|
include project("${it.name}:")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// workaround linux segfault
|
|
|
|
compile "org.lwjgl:lwjgl-jemalloc:3.2.1"
|
2018-11-05 09:54:00 -05:00
|
|
|
}
|
|
|
|
|
2019-04-23 18:46:23 -04:00
|
|
|
version = baseVersion + "+" + (ENV.BUILD_NUMBER ? ("build." + ENV.BUILD_NUMBER) : "local")
|
|
|
|
|
2019-04-23 18:48:31 -04:00
|
|
|
//curseforge {
|
|
|
|
// if (project.hasProperty('curse_api_key')){
|
|
|
|
// apiKey = project.getProperty('curse_api_key')
|
|
|
|
// }
|
|
|
|
// project {
|
|
|
|
// id = '306612'
|
|
|
|
// changelog = 'A changelog can be found at https://github.com/FabricMC/fabric/commits/master'
|
|
|
|
// releaseType = 'alpha'
|
|
|
|
// addGameVersion '1.14-Snapshot'
|
|
|
|
// mainArtifact(jar) {
|
|
|
|
// displayName = "[$mcVersion] Fabric API $baseVersion build $ENV.BUILD_NUMBER"
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// options{
|
|
|
|
// forgeGradleIntegration = false
|
|
|
|
// }
|
|
|
|
//}
|
2018-12-14 13:48:37 -05:00
|
|
|
|
2018-11-05 09:54:00 -05:00
|
|
|
apply from: 'https://github.com/FabricMC/fabric-docs/raw/master/gradle/ideconfig.gradle'
|