2015-12-17 11:13:44 +00:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
2019-01-07 06:13:56 +00:00
|
|
|
mavenLocal()
|
|
|
|
maven { url = 'https://files.minecraftforge.net/maven' }
|
2015-12-17 11:13:44 +00:00
|
|
|
jcenter()
|
2019-01-07 06:13:56 +00:00
|
|
|
mavenCentral()
|
2015-12-17 11:13:44 +00:00
|
|
|
}
|
|
|
|
dependencies {
|
2019-01-09 01:33:02 +00:00
|
|
|
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
|
2015-12-17 11:13:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-07 06:13:56 +00:00
|
|
|
/*plugins {
|
|
|
|
id "com.matthewprenger.cursegradle" version "1.1.2"
|
|
|
|
}*/
|
2015-09-19 02:02:35 +00:00
|
|
|
|
2019-01-07 06:13:56 +00:00
|
|
|
apply plugin: 'net.minecraftforge.gradle'
|
2015-12-17 11:17:18 +00:00
|
|
|
apply plugin: 'maven'
|
2019-01-07 06:13:56 +00:00
|
|
|
apply plugin: 'eclipse'
|
2019-01-07 08:35:58 +00:00
|
|
|
apply plugin: 'idea'
|
2015-12-17 11:17:18 +00:00
|
|
|
|
2014-10-04 14:37:48 +00:00
|
|
|
// define the properties file
|
|
|
|
ext.configFile = file "build.properties"
|
|
|
|
|
|
|
|
configFile.withReader {
|
|
|
|
// read config. it shall from now on be referenced as simply config or as project.config
|
|
|
|
def prop = new Properties()
|
|
|
|
prop.load(it)
|
|
|
|
project.ext.config = new ConfigSlurper().parse prop
|
|
|
|
}
|
|
|
|
|
2014-10-05 01:07:24 +00:00
|
|
|
group = "com.github.glitchfiend.biomesoplenty"
|
2015-06-19 09:58:24 +00:00
|
|
|
archivesBaseName = "BiomesOPlenty"
|
2014-10-04 14:37:48 +00:00
|
|
|
|
2016-03-28 23:52:57 +00:00
|
|
|
// add some stuff to the version
|
|
|
|
version = "${config.minecraft_version}-${config.mod_version}.${System.getenv().BUILD_NUMBER}"
|
|
|
|
config.build_number = (System.getenv().BUILD_NUMBER) ? System.getenv().BUILD_NUMBER : ""
|
|
|
|
|
2019-01-07 06:13:56 +00:00
|
|
|
sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
|
|
|
|
compileJava {
|
|
|
|
sourceCompatibility = targetCompatibility = '1.8'
|
|
|
|
}
|
|
|
|
|
2014-10-04 14:37:48 +00:00
|
|
|
minecraft {
|
2019-01-07 06:13:56 +00:00
|
|
|
mappings channel: 'snapshot', version: config.mappings_version
|
|
|
|
|
2019-01-09 01:33:02 +00:00
|
|
|
runs {
|
|
|
|
client = {
|
|
|
|
main "net.minecraftforge.userdev.UserdevLauncher"
|
|
|
|
workingDirectory = project.file("run").canonicalPath
|
|
|
|
environment "target", "fmluserdevclient"
|
|
|
|
environment "assetDirectory", downloadAssets.output.absolutePath
|
|
|
|
environment "FORGE_VERSION", config.forge_version
|
|
|
|
environment "FORGE_GROUP", config.forge_group
|
|
|
|
environment "MCP_VERSION", config.mappings_version
|
|
|
|
environment "MC_VERSION", config.minecraft_version
|
|
|
|
environment "MOD_CLASSES", "${sourceSets.main.output.resourcesDir}${File.pathSeparator}${sourceSets.main.output.classesDirs.join(File.pathSeparator)}"
|
|
|
|
}
|
|
|
|
server = {
|
|
|
|
main "net.minecraftforge.userdev.UserdevLauncher"
|
|
|
|
workingDirectory = project.file("run").canonicalPath
|
|
|
|
environment "target", "fmluserdevserver"
|
|
|
|
environment "assetDirectory", downloadAssets.output.absolutePath
|
|
|
|
environment "FORGE_VERSION", config.forge_version
|
|
|
|
environment "FORGE_GROUP", config.forge_group
|
|
|
|
environment "MCP_VERSION", config.mappings_version
|
|
|
|
environment "MC_VERSION", config.minecraft_version
|
|
|
|
environment "MOD_CLASSES", "${sourceSets.main.output.resourcesDir}${File.pathSeparator}${sourceSets.main.output.classesDirs.join(File.pathSeparator)}"
|
|
|
|
}
|
2019-01-07 06:13:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2019-01-09 01:33:02 +00:00
|
|
|
minecraft 'net.minecraftforge.test:forge:' + config.minecraft_version + '-' + config.forge_version
|
2019-01-07 06:13:56 +00:00
|
|
|
compile 'net.minecraftforge.test:forge:' + config.minecraft_version + '-' + config.forge_version + ':launcher'
|
2014-10-04 14:37:48 +00:00
|
|
|
}
|
|
|
|
|
2015-02-10 05:52:42 +00:00
|
|
|
def commonManifest = {
|
|
|
|
attributes 'FMLAT': 'biomesoplenty_at.cfg'
|
|
|
|
}
|
|
|
|
|
2015-01-11 08:33:37 +00:00
|
|
|
jar {
|
2015-03-10 05:33:46 +00:00
|
|
|
manifest commonManifest
|
2015-01-11 08:33:37 +00:00
|
|
|
classifier = 'universal'
|
|
|
|
}
|
|
|
|
|
2014-10-04 14:37:48 +00:00
|
|
|
processResources {
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
|
|
include '**/*.info'
|
|
|
|
include '**/*.properties'
|
|
|
|
|
|
|
|
// replaces
|
|
|
|
expand ([
|
|
|
|
'modid': project.archivesBaseName,
|
|
|
|
'mod_version': project.config.mod_version,
|
|
|
|
'minecraft_version': project.config.minecraft_version,
|
2014-10-05 00:39:00 +00:00
|
|
|
'build_number': project.config.build_number
|
2014-10-04 14:37:48 +00:00
|
|
|
])
|
|
|
|
}
|
|
|
|
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
|
|
exclude '**/*.info'
|
|
|
|
exclude '**/*.properties'
|
|
|
|
}
|
|
|
|
}
|
2017-11-01 00:48:04 +00:00
|
|
|
|
2015-12-15 08:36:54 +00:00
|
|
|
task sourcesJar(type: Jar) {
|
2014-10-04 14:37:48 +00:00
|
|
|
from sourceSets.main.allJava
|
2015-01-12 01:25:11 +00:00
|
|
|
from (sourceSets.main.output) {
|
|
|
|
include 'LICENSE.txt'
|
|
|
|
}
|
|
|
|
|
2014-10-04 14:37:48 +00:00
|
|
|
classifier = 'sources'
|
|
|
|
}
|
|
|
|
|
|
|
|
task deobfJar(type: Jar) {
|
|
|
|
from sourceSets.main.output
|
2015-02-10 05:52:42 +00:00
|
|
|
|
|
|
|
manifest commonManifest
|
2014-10-04 14:37:48 +00:00
|
|
|
classifier = 'deobf'
|
|
|
|
}
|
|
|
|
|
2016-04-23 01:22:04 +00:00
|
|
|
task apiJar(type: Jar) {
|
2016-11-17 10:19:12 +00:00
|
|
|
from(sourceSets.main.allJava) {
|
|
|
|
include 'biomesoplenty/api/**'
|
|
|
|
}
|
|
|
|
from (sourceSets.main.output) {
|
2016-04-23 01:22:04 +00:00
|
|
|
include 'LICENSE.txt'
|
2016-11-17 10:19:12 +00:00
|
|
|
include 'biomesoplenty/api/**'
|
2016-04-23 01:22:04 +00:00
|
|
|
}
|
|
|
|
|
2016-11-17 10:19:12 +00:00
|
|
|
classifier = 'api'
|
2016-04-23 01:22:04 +00:00
|
|
|
}
|
|
|
|
|
2015-12-17 07:44:55 +00:00
|
|
|
task listOutputs << {
|
2015-12-17 11:13:44 +00:00
|
|
|
//This is needed by the Groovy Postbuild to append labels for each build used in the changelog.
|
|
|
|
println "Output files:"
|
|
|
|
println "--------------------"
|
|
|
|
def list = []
|
|
|
|
|
|
|
|
def dir = new File("build/libs/")
|
|
|
|
|
|
|
|
if (dir.exists()) {
|
|
|
|
dir.eachFileRecurse (FileType.FILES) { file ->
|
|
|
|
//Add each file to the list
|
|
|
|
list << file
|
|
|
|
}
|
|
|
|
|
|
|
|
//Print the names of all of the output files
|
|
|
|
list.each {
|
|
|
|
println it.getName()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
println "--------------------"
|
2015-12-17 07:44:55 +00:00
|
|
|
}
|
|
|
|
|
2015-12-17 07:58:18 +00:00
|
|
|
tasks.build.finalizedBy('listOutputs')
|
2015-12-17 07:44:55 +00:00
|
|
|
|
2014-10-04 14:37:48 +00:00
|
|
|
artifacts {
|
2015-12-15 08:36:54 +00:00
|
|
|
archives sourcesJar
|
2014-10-04 14:37:48 +00:00
|
|
|
archives deobfJar
|
2016-04-23 01:22:04 +00:00
|
|
|
archives apiJar
|
2014-10-04 14:37:48 +00:00
|
|
|
}
|
|
|
|
|
2019-01-07 06:13:56 +00:00
|
|
|
/*curseforge {
|
2015-12-17 11:06:26 +00:00
|
|
|
apiKey = "$System.env.curse_api_key"
|
|
|
|
project {
|
|
|
|
id = '220318'
|
2017-11-01 00:48:04 +00:00
|
|
|
changelog = file('build/libs/' + project.getName() + '-' + project.version + '-changelog.txt')
|
2015-12-17 11:06:26 +00:00
|
|
|
releaseType = 'beta'
|
|
|
|
}
|
2019-01-07 06:13:56 +00:00
|
|
|
}*/
|
2015-12-17 11:06:26 +00:00
|
|
|
|
2015-01-12 01:06:26 +00:00
|
|
|
uploadArchives {
|
2015-12-17 07:28:20 +00:00
|
|
|
repositories {
|
2016-01-01 00:49:15 +00:00
|
|
|
mavenDeployer {
|
2016-01-01 02:19:16 +00:00
|
|
|
if (project.hasProperty('forgeMavenPassword'))
|
2016-01-01 01:45:34 +00:00
|
|
|
{
|
2018-11-26 01:51:55 +00:00
|
|
|
repository(url: "https://files.minecraftforge.net/maven/manage/upload") {
|
2016-01-01 02:39:38 +00:00
|
|
|
authentication(userName: project.getProperty('forgeMavenUsername'), password: project.getProperty('forgeMavenPassword'))
|
2016-01-01 01:45:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// local repo folder. Might wanna juset use gradle install if you wanans end it to maven-local
|
|
|
|
repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath())
|
|
|
|
}
|
|
|
|
|
2016-01-01 00:49:15 +00:00
|
|
|
pom {
|
|
|
|
groupId = project.group
|
|
|
|
version = project.version
|
|
|
|
artifactId = project.archivesBaseName
|
|
|
|
project {
|
|
|
|
name project.archivesBaseName
|
|
|
|
packaging 'jar'
|
|
|
|
description 'Biomes O Plenty'
|
|
|
|
url 'https://github.com/Glitchfiend/BiomesOPlenty'
|
|
|
|
|
|
|
|
scm {
|
2015-12-17 11:13:44 +00:00
|
|
|
url 'https://github.com/Glitchfiend/BiomesOPlenty'
|
2016-01-01 00:49:15 +00:00
|
|
|
connection 'scm:git:git://github.com/Glitchfiend/BiomesOPlenty.git'
|
|
|
|
developerConnection 'scm:git:git@github.com:Glitchfiend/BiomesOPlenty.git'
|
|
|
|
}
|
|
|
|
|
|
|
|
issueManagement {
|
|
|
|
system 'github'
|
|
|
|
url 'https://github.com/Glitchfiend/BiomesOPlenty/issues'
|
|
|
|
}
|
|
|
|
|
|
|
|
licenses {
|
|
|
|
license {
|
|
|
|
name 'Creative Commons Attribution-NonCommercial-NoDerivs 4.0 International Public License'
|
|
|
|
url 'http://creativecommons.org/licenses/by-nc-nd/4.0/'
|
|
|
|
distribution 'repo'
|
2015-12-17 11:13:44 +00:00
|
|
|
}
|
2016-01-01 00:49:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
developers {
|
|
|
|
developer {
|
|
|
|
id 'Adubbz'
|
|
|
|
name 'Adubbz'
|
|
|
|
roles { role 'developer' }
|
|
|
|
}
|
|
|
|
developer {
|
|
|
|
id 'Amnet'
|
|
|
|
name 'Amnet'
|
|
|
|
roles { role 'developer' }
|
2015-12-17 11:13:44 +00:00
|
|
|
}
|
2016-01-01 00:49:15 +00:00
|
|
|
developer {
|
|
|
|
id 'Forstride'
|
|
|
|
name 'Forstride'
|
|
|
|
roles { role 'developer' }
|
2015-12-17 11:13:44 +00:00
|
|
|
}
|
2016-01-01 00:49:15 +00:00
|
|
|
developer {
|
|
|
|
id 'ted80'
|
|
|
|
name 'ted80'
|
|
|
|
roles { role 'developer' }
|
2015-12-17 11:13:44 +00:00
|
|
|
}
|
|
|
|
}
|
2015-12-15 23:21:01 +00:00
|
|
|
}
|
2015-09-19 11:40:38 +00:00
|
|
|
}
|
2016-01-01 00:49:15 +00:00
|
|
|
}
|
2015-09-19 02:02:35 +00:00
|
|
|
}
|
2015-12-17 11:06:26 +00:00
|
|
|
}
|