Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- buildscript {
- repositories {
- jcenter()
- maven {
- name = "forge"
- url = "http://files.minecraftforge.net/maven"
- }
- mavenCentral()
- maven {
- name = "sonatype"
- url = "https://oss.sonatype.org/content/repositories/snapshots/"
- }
- }
- dependencies {
- classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
- classpath group: 'com.github.rodionmoiseev.gradle.plugins', name: 'idea-utils', version: '0.2'
- }
- }
- import groovy.json.*
- configurations {
- compile
- deployJars
- }
- apply plugin: "net.minecraftforge.gradle.forge"
- apply plugin: "maven"
- apply plugin: "idea-utils"
- group = "net.doubledoordev.d3core"
- version = "1.1.1"
- targetCompatibility = 1.7
- sourceCompatibility = 1.7
- archivesBaseName = 'D3Core'
- def githuborg = 'DoubleDoorDevelopment'
- def description = 'DoubleDoor Development Core'
- minecraft {
- version = "1.9-12.16.0.1853-1.9"
- mappings = "snapshot_20160324"
- runDir = "run"
- }
- if (System.getenv().BUILD_NUMBER != null) version += "." + System.getenv().BUILD_NUMBER
- def builder = new groovy.json.JsonBuilder()
- builder (version: version, mcversion: project.minecraft.version, apiversion: project.minecraft.apiVersion)
- new File("versions.json").write(builder.toPrettyString())
- processResources {
- from(sourceSets.main.resources.srcDirs) {
- expand 'version':project.version, 'mcversion':project.minecraft.version, 'modid':project.archivesBaseName, 'githuborg':githuborg, 'description':description, 'group':project.group, 'artifactId':project.archivesBaseName
- }
- }
- task sourcesJar(type: Jar) {
- from "LICENSE.txt"
- from sourceSets.main.allSource
- classifier = 'src'
- appendix = project.minecraft.version
- manifest {
- attributes 'FMLAT': 'D3Core_at.cfg'
- }
- }
- task deobfJar(type: Jar) {
- from "LICENSE.txt"
- from sourceSets.main.output
- from (sourceSets.main.allSource.srcDirs) {
- include '**/*.java'
- }
- classifier = 'dev'
- appendix = project.minecraft.version
- manifest {
- attributes 'FMLAT': 'D3Core_at.cfg'
- }
- }
- jar {
- from "LICENSE.txt"
- appendix = project.minecraft.version
- manifest {
- attributes 'FMLAT': 'D3Core_at.cfg'
- }
- }
- artifacts {
- archives jar
- archives sourcesJar
- archives deobfJar
- }
- idea {
- project {
- copyright {
- name = 'New BSD License'
- license = file('LICENSE.txt')
- }
- }
- }
- uploadArchives {
- if (project.hasProperty("dddUser") && project.hasProperty("dddUrl") && project.hasProperty("dddPass")) {
- repositories {
- mavenDeployer {
- repository(url: dddUrl) {
- authentication(userName: dddUser, password: dddPass)
- }
- pom {
- groupId = project.group
- version = project.minecraft.version + "-" + project.version
- artifactId = project.archivesBaseName
- project {
- name project.archivesBaseName
- packaging 'jar'
- description = description
- url 'https://github.com/' + githuborg + '/' + project.archivesBaseName
- scm {
- url 'https://github.com/' + githuborg + '/' + project.archivesBaseName
- connection 'scm:git:git://github.com/' + githuborg + '/' + project.archivesBaseName + '.git'
- developerConnection 'scm:git:git@github.com:' + githuborg + '/' + project.archivesBaseName + '.git'
- }
- issueManagement {
- system 'github'
- url 'https://github.com/' + githuborg + '/' + project.archivesBaseName + '/issues'
- }
- licenses {
- license {
- name 'New BSD License'
- url 'https://raw.github.com/' + githuborg + '/' + project.archivesBaseName + '/master/LICENCE.txt'
- distribution 'repo'
- }
- }
- developers {
- developer {
- id 'Dries007'
- name 'Dries007'
- roles { role 'developer' }
- }
- developer {
- id 'Claycorp'
- name 'Claycorp'
- roles { role 'developer' }
- }
- }
- }
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment