Gradle is awful
This commit is contained in:
20
build.gradle
20
build.gradle
@@ -186,7 +186,7 @@ allprojects{
|
|||||||
maven{ url 'https://jitpack.io' }
|
maven{ url 'https://jitpack.io' }
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register('clearCache'){
|
task clearCache{
|
||||||
doFirst{
|
doFirst{
|
||||||
delete{
|
delete{
|
||||||
delete "$rootDir/core/assets/cache"
|
delete "$rootDir/core/assets/cache"
|
||||||
@@ -272,7 +272,7 @@ project(":core"){
|
|||||||
|
|
||||||
compileJava.options.fork = true
|
compileJava.options.fork = true
|
||||||
|
|
||||||
tasks.register('preGen'){
|
task preGen{
|
||||||
outputs.upToDateWhen{ false }
|
outputs.upToDateWhen{ false }
|
||||||
generateLocales()
|
generateLocales()
|
||||||
writeVersion()
|
writeVersion()
|
||||||
@@ -280,7 +280,7 @@ project(":core"){
|
|||||||
writePlugins()
|
writePlugins()
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register('copyChangelog'){
|
task copyChangelog{
|
||||||
doLast{
|
doLast{
|
||||||
def props = loadVersionProps()
|
def props = loadVersionProps()
|
||||||
def androidVersion = props['androidBuildCode'].toInteger() - 2
|
def androidVersion = props['androidBuildCode'].toInteger() - 2
|
||||||
@@ -304,21 +304,19 @@ project(":core"){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register('sourcesJar', Jar){
|
task sourcesJar(type: Jar, dependsOn: classes){
|
||||||
dependsOn classes
|
|
||||||
archiveClassifier = 'sources'
|
archiveClassifier = 'sources'
|
||||||
from sourceSets.main.allSource
|
from sourceSets.main.allSource
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register('assetsJar', Jar){
|
task assetsJar(type: Jar, dependsOn: ":tools:pack"){
|
||||||
dependsOn ":tools:pack"
|
|
||||||
archiveClassifier = 'assets'
|
archiveClassifier = 'assets'
|
||||||
from files("assets"){
|
from files("assets"){
|
||||||
exclude "config", "cache", "music", "sounds", "sprites/fallback"
|
exclude "config", "cache", "music", "sounds", "sprites/fallback"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register('musicJar', Jar){
|
task musicJar(type: Jar){
|
||||||
archiveClassifier = 'music'
|
archiveClassifier = 'music'
|
||||||
from files("assets"){
|
from files("assets"){
|
||||||
include "music/*", "sounds/*"
|
include "music/*", "sounds/*"
|
||||||
@@ -461,8 +459,8 @@ configure([":core", ":server"].collect{project(it)}){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register('deployAll'){
|
task deployAll{
|
||||||
tasks.register('cleanDeployOutput'){
|
task cleanDeployOutput{
|
||||||
doFirst{
|
doFirst{
|
||||||
if(getBuildVersion() == "custom build" || getBuildVersion() == "") throw new IllegalArgumentException("----\n\nSET A BUILD NUMBER FIRST!\n\n----")
|
if(getBuildVersion() == "custom build" || getBuildVersion() == "") throw new IllegalArgumentException("----\n\nSET A BUILD NUMBER FIRST!\n\n----")
|
||||||
if(!project.hasProperty("release")) throw new IllegalArgumentException("----\n\nSET THE RELEASE PROJECT PROPERTY FIRST!\n\n----")
|
if(!project.hasProperty("release")) throw new IllegalArgumentException("----\n\nSET THE RELEASE PROJECT PROPERTY FIRST!\n\n----")
|
||||||
@@ -484,7 +482,7 @@ tasks.register('deployAll'){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register('resolveDependencies'){
|
task resolveDependencies{
|
||||||
doLast{
|
doLast{
|
||||||
rootProject.allprojects{ project ->
|
rootProject.allprojects{ project ->
|
||||||
Set<Configuration> configurations = project.buildscript.configurations + project.configurations
|
Set<Configuration> configurations = project.buildscript.configurations + project.configurations
|
||||||
|
|||||||
Reference in New Issue
Block a user