import org.ajoberstar.grgit.Grgit buildscript { repositories { mavenLocal() mavenCentral() maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" } jcenter() } configurations.all { resolutionStrategy { force 'com.google.guava:guava:21.0' force 'org.ow2.asm:asm:6.0_BETA' force 'commons-io:commons-io:2.4' } } dependencies { classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4' classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.8.1' } } plugins { id 'net.minecrell.licenser' version '0.4.1' apply false id "org.ajoberstar.grgit" version "3.1.1" } apply plugin: 'java' def splashFile = new File('splash.txt') if (splashFile.exists()) { print splashFile.text } group = 'com.boydti.fawe' def rootVersion = "1.13" def revision = "" def buildNumber = "" def date = "" ext { git = Grgit.open(dir: '.git') date = git.head().getDate().format("yy.MM.dd") revision = "-${git.head().abbreviatedId}" parents = git.head().parentIds; if (project.hasProperty('buildnumber')) { buildNumber = "$buildnumber" } else { index = -2109; // Offset to match CI for (; parents != null && !parents.isEmpty(); index++) { parents = git.getResolve().toCommit(parents.get(0)).getParentIds() } buildNumber = "${index}" } } version = String.format("%s.%s", rootVersion, buildNumber) description = rootProject.name subprojects { apply plugin: 'java' apply plugin: 'maven' apply plugin: 'com.github.johnrengelman.shadow' //Enable this requires putting license header files in many, many FAWE files //apply plugin: 'net.minecrell.licenser' sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 clean.doFirst { delete "../target" } compileJava { options.compilerArgs += ["-parameters"] } repositories { mavenCentral() maven { url "http://maven.sk89q.com/repo/" } maven { url "http://repo.maven.apache.org/maven2" } // Fawe maven {url "https://mvnrepository.com/artifact/"} maven {url "http://repo.dmulloy2.net/content/groups/public/"} maven {url "https://repo.destroystokyo.com/repository/maven-public//"} maven {url "http://ci.athion.net/job/PlotSquared-Breaking/ws/mvn/"} mavenLocal() maven {url "http://empcraft.com/maven2"} maven {url "https://hub.spigotmc.org/nexus/content/groups/public/"} maven {url "http://ci.frostcast.net/plugin/repository/everything"} maven {url "http://maven.sk89q.com/artifactory/repo"} maven {url "http://repo.spongepowered.org/maven"} maven {url "http://dl.bintray.com/tastybento/maven-repo"} maven {url "http://ci.emc.gs/nexus/content/groups/aikar/" } } if (!(name.equals('worldedit-forge') || name.equals('worldedit-sponge'))) { task sourcesJar(type: Jar, dependsOn: classes) { classifier = 'sources' from sourceSets.main.allSource } artifacts { archives sourcesJar } build.dependsOn(sourcesJar) } shadowJar { classifier 'dist' dependencies { include(dependency('com.sk89q:jchronic:0.2.4a')) include(dependency('com.thoughtworks.paranamer:paranamer:2.6')) include(dependency('com.sk89q.lib:jlibnoise:1.0.0')) include(dependency('com.github.luben:zstd-jni:1.1.1')) include(dependency('co.aikar:fastutil-lite:1.0')) } exclude 'GradleStart**' exclude '.cache' exclude 'LICENSE*' } // Enable this requires putting license header files in many, many FAWE files //license { // header = rootProject.file("HEADER.txt") // include '**/*.java' //} }