BiomesOPlenty/build.gradle

157 lines
4.7 KiB
Groovy
Raw Normal View History

buildscript {
repositories {
mavenLocal()
maven { url = 'https://files.minecraftforge.net/maven' }
jcenter()
mavenCentral()
}
dependencies {
2019-01-09 01:33:02 +00:00
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
}
}
2019-05-04 04:59:07 +00:00
plugins {
id "com.matthewprenger.cursegradle" version "1.2.0"
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'idea'
2019-05-04 04:59:07 +00:00
apply plugin: 'maven'
2015-12-17 11:17:18 +00:00
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
2019-04-30 05:39:42 +00:00
version = "${minecraft_version}-${mod_version}.${System.getenv().BUILD_NUMBER}"
2019-05-04 04:59:07 +00:00
// set this for the version.properties file, or was this broken on purpose?
2019-04-30 05:39:42 +00:00
def build_number = (System.getenv().BUILD_NUMBER) ? System.getenv().BUILD_NUMBER : ""
2014-10-04 14:37:48 +00:00
minecraft {
2019-04-30 05:39:42 +00:00
mappings channel: 'snapshot', version: mappings_version
accessTransformer = file('src/main/resources/META-INF/biomesoplenty_at.cfg')
2019-01-09 01:33:02 +00:00
runs {
client = {
workingDirectory = project.file("run").canonicalPath
source sourceSets.main
2019-01-09 01:33:02 +00:00
}
server = {
workingDirectory = project.file("run").canonicalPath
source sourceSets.main
2019-01-09 01:33:02 +00:00
}
}
}
dependencies {
2019-04-30 05:39:42 +00:00
minecraft 'net.minecraftforge:forge:' + minecraft_version + '-' + forge_version
2019-05-04 04:59:07 +00:00
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
from (sourceSets.main.output) {
include 'LICENSE.txt'
}
classifier = 'sources'
}
task deobfJar(type: Jar) {
from sourceSets.main.output
classifier = 'deobf'
}
task apiJar(type: Jar) {
from(sourceSets.main.allJava) {
include 'biomesoplenty/api/**'
}
from (sourceSets.main.output) {
include 'LICENSE.txt'
include 'biomesoplenty/api/**'
}
classifier = 'api'
}
curseforge {
if (project.hasProperty('curseApiKey')) {
apiKey = project.getProperty('curseApiKey')
project {
id = '220318'
changelog = file('build/changelog.txt')
releaseType = 'beta'
}
}
}
def changelog = rootProject.file('build/changelog.txt')
artifacts {
if (changelog.exists()) {
archives changelog
}
archives sourcesJar
archives deobfJar
archives apiJar
}
uploadArchives {
repositories {
mavenDeployer {
if (project.hasProperty('forgeMavenPassword')) {
repository(url: "https://files.minecraftforge.net/maven/manage/upload") {
authentication(userName: project.getProperty('forgeMavenUsername'), password: project.getProperty('forgeMavenPassword'))
}
}
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())
}
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 {
url 'https://github.com/Glitchfiend/BiomesOPlenty'
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'
}
}
developers {
developer {
id 'Adubbz'
name 'Adubbz'
roles { role 'developer' }
}
developer {
id 'Forstride'
name 'Forstride'
roles { role 'developer' }
}
}
}
}
}
}
}