Mindustry/build.gradle

470 lines
15 KiB
Groovy
Raw Normal View History

buildscript{
2020-01-23 07:16:56 +07:00
ext{
2023-10-31 02:01:57 +07:00
arcHash = property("archash")
2023-10-31 01:56:40 +07:00
localArc = !project.hasProperty("release") && new File(rootDir.parent, 'Arc').exists() && !project.hasProperty("noLocalArc")
arcModule = { String name ->
//skip to last submodule
name = name.substring(name.lastIndexOf(':') + 1)
return "com.github.Anuken${localArc ? "" : ".Arc"}:$name:$arcHash"
}
2020-01-23 07:16:56 +07:00
}
repositories{
2017-04-30 08:25:59 +07:00
mavenLocal()
mavenCentral()
2017-12-20 08:51:46 +07:00
google()
maven{ url "https://oss.sonatype.org/content/repositories/snapshots/" }
2019-10-23 05:45:05 +07:00
maven{ url 'https://jitpack.io' }
2017-04-30 08:25:59 +07:00
}
2018-12-30 03:58:11 +07:00
dependencies{
2023-10-31 01:56:40 +07:00
classpath arcModule(":extensions:packer")
classpath arcModule(":arc-core")
2017-04-30 08:25:59 +07:00
}
}
2021-04-03 11:59:57 +07:00
plugins{
I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN V
2023-09-04 08:52:25 +07:00
id "org.jetbrains.kotlin.jvm" version "1.6.0"
id "org.jetbrains.kotlin.kapt" version "1.6.0"
}
allprojects{
2021-06-02 22:08:08 +07:00
apply plugin: 'maven-publish'
2020-04-30 06:54:20 +07:00
2022-05-11 06:43:47 +07:00
version = project.hasProperty("packageVersion") ? project.getProperty("packageVersion") : 'release'
2019-08-29 09:07:08 +07:00
group = 'com.github.Anuken'
2018-02-22 07:50:27 +07:00
ext{
2021-06-02 22:08:08 +07:00
versionNumber = '7'
2022-11-11 00:43:29 +07:00
if(!project.hasProperty("versionModifier")) versionModifier = 'release'
if(!project.hasProperty("versionType")) versionType = 'official'
appName = 'Mindustry'
2021-06-02 22:08:08 +07:00
steamworksVersion = '0b86023401880bb5e586bc404bedbaae9b1f1c94'
2021-12-14 11:14:26 +07:00
rhinoVersion = '73a812444ac388ac2d94013b5cadc8f70b7ea027'
2019-04-08 20:03:18 +07:00
2019-11-20 07:08:41 +07:00
loadVersionProps = {
return new Properties().with{p -> p.load(file('../core/assets/version.properties').newReader()); return p }
}
debugged = {
2019-09-22 03:44:47 +07:00
return new File(projectDir.parent, '../Mindustry-Debug').exists() && !project.hasProperty("release") && project.hasProperty("args")
}
2018-12-30 00:22:41 +07:00
2019-08-16 22:00:15 +07:00
generateDeployName = { String platform ->
if(platform == "windows"){
platform += "64"
}
platform = platform.capitalize()
if(platform.endsWith("64") || platform.endsWith("32")){
platform = "${platform.substring(0, platform.length() - 2)}-${platform.substring(platform.length() - 2)}bit"
}
2019-08-16 22:14:18 +07:00
return "[${platform}]${getModifierString()}[${getNeatVersionString()}]${appName}"
2019-08-16 22:00:15 +07:00
}
getVersionString = {
String buildVersion = getBuildVersion()
return "$versionNumber-$versionModifier-$buildVersion"
}
2019-08-16 22:00:15 +07:00
getNeatVersionString = {
String buildVersion = getBuildVersion()
return "v$buildVersion"
}
2020-12-16 03:24:09 +07:00
hasSprites = {
2021-06-02 22:08:08 +07:00
return new File(rootDir, "core/assets/sprites/sprites.aatls").exists()
2020-12-16 03:24:09 +07:00
}
2019-08-16 22:00:15 +07:00
getModifierString = {
2021-06-02 22:08:08 +07:00
if(versionModifier != "release") return "[${versionModifier.toUpperCase()}]"
2019-08-16 22:00:15 +07:00
return ""
}
getBuildVersion = {
if(!project.hasProperty("buildversion")) return "custom build"
return project.getProperties()["buildversion"]
}
getPackage = {
return project.ext.mainClassName.substring(0, project.ext.mainClassName.indexOf("desktop") - 1)
}
2018-05-04 00:04:30 +07:00
2020-11-21 00:38:16 +07:00
findSdkDir = {
//null because IntelliJ doesn't get env variables
def v = System.getenv("ANDROID_HOME")
if(v != null) return v
//rootDir is null here, amazing. brilliant.
2021-06-02 22:08:08 +07:00
def file = new File(rootDir, "local.properties")
2020-11-21 00:38:16 +07:00
def props = new Properties().with{p -> p.load(file.newReader()); return p }
return props.get("sdk.dir")
}
generateLocales = {
2018-09-10 03:19:53 +07:00
def output = 'en\n'
2018-08-25 00:54:53 +07:00
def bundles = new File(project(':core').projectDir, 'assets/bundles/')
bundles.listFiles().each{ other ->
2018-10-06 22:56:39 +07:00
if(other.name == "bundle.properties") return
2018-09-10 03:19:53 +07:00
output += other.name.substring("bundle".length() + 1, other.name.lastIndexOf('.')) + "\n"
}
2018-10-06 22:56:39 +07:00
new File(project(':core').projectDir, 'assets/locales').text = output
2020-06-05 21:45:57 +07:00
new File(project(':core').projectDir, 'assets/basepartnames').text = new File(project(':core').projectDir, 'assets/baseparts/').list().join("\n")
}
2018-05-04 00:04:30 +07:00
writeVersion = {
2018-08-25 00:54:53 +07:00
def pfile = new File(project(':core').projectDir, 'assets/version.properties')
2018-05-04 00:04:30 +07:00
def props = new Properties()
try{
pfile.createNewFile()
2019-04-08 20:03:18 +07:00
}catch(Exception ignored){
}
2018-05-04 00:04:30 +07:00
if(pfile.exists()){
2018-05-04 00:04:30 +07:00
props.load(new FileInputStream(pfile))
2018-09-04 23:10:48 +07:00
String buildid = getBuildVersion()
2019-08-26 09:02:00 +07:00
println("Compiling with build: '$buildid'")
2018-05-04 00:04:30 +07:00
2018-09-04 23:10:48 +07:00
props["type"] = versionType
props["number"] = versionNumber
props["modifier"] = versionModifier
props["build"] = buildid
2018-05-04 00:04:30 +07:00
props.store(pfile.newWriter(), "Autogenerated file. Do not modify.")
}
}
2020-01-25 06:31:54 +07:00
writeProcessors = {
2020-01-27 01:16:42 +07:00
new File(rootDir, "annotations/src/main/resources/META-INF/services/").mkdirs()
2020-01-25 06:31:54 +07:00
def processorFile = new File(rootDir, "annotations/src/main/resources/META-INF/services/javax.annotation.processing.Processor")
def text = new StringBuilder()
def files = new File(rootDir, "annotations/src/main/java")
files.eachFileRecurse(groovy.io.FileType.FILES){ file ->
if(file.name.endsWith(".java") && (file.text.contains(" extends BaseProcessor") || (file.text.contains(" extends AbstractProcessor") && !file.text.contains("abstract class")))){
text.append(file.path.substring(files.path.length() + 1)).append("\n")
}
}
processorFile.text = text.toString().replace(".java", "").replace("/", ".").replace("\\", ".")
}
2020-05-28 05:11:42 +07:00
writePlugins = {
new File(rootDir, "annotations/src/main/resources/META-INF/services/").mkdirs()
def processorFile = new File(rootDir, "annotations/src/main/resources/META-INF/services/com.sun.source.util.Plugin")
def text = new StringBuilder()
def files = new File(rootDir, "annotations/src/main/java")
files.eachFileRecurse(groovy.io.FileType.FILES){ file ->
if(file.name.endsWith(".java") && (file.text.contains(" implements Plugin"))){
text.append(file.path.substring(files.path.length() + 1)).append("\n")
}
}
processorFile.text = text.toString().replace(".java", "").replace("/", ".").replace("\\", ".")
}
2017-04-30 08:25:59 +07:00
}
repositories{
2017-04-30 08:25:59 +07:00
mavenLocal()
mavenCentral()
maven{ url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven{ url "https://oss.sonatype.org/content/repositories/releases/" }
maven{ url 'https://jitpack.io' }
2017-04-30 08:25:59 +07:00
}
2020-11-10 02:33:28 +07:00
task clearCache{
doFirst{
delete{
delete "$rootDir/core/assets/cache"
}
}
}
2020-06-16 08:52:51 +07:00
tasks.withType(JavaCompile){
targetCompatibility = 8
2021-06-14 21:55:28 +07:00
sourceCompatibility = JavaVersion.VERSION_16
2020-06-16 08:52:51 +07:00
options.encoding = "UTF-8"
2020-06-27 01:27:26 +07:00
options.compilerArgs += ["-Xlint:deprecation"]
2020-11-10 02:33:28 +07:00
dependsOn clearCache
2021-06-02 22:08:08 +07:00
options.forkOptions.jvmArgs += [
2022-06-12 01:02:21 +07:00
'--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED',
'--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED',
'--add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED',
'--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED',
'--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED',
'--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED',
'--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED',
'--add-opens=java.base/sun.reflect.annotation=ALL-UNNAMED'
]
2020-06-16 08:52:51 +07:00
}
2017-04-30 08:25:59 +07:00
}
configure(project(":annotations")){
tasks.withType(JavaCompile){
targetCompatibility = 8
sourceCompatibility = 8
2021-06-02 22:08:08 +07:00
options.fork = true
}
}
//compile with java 8 compatibility for everything except the annotation project
2020-08-15 06:45:22 +07:00
configure(subprojects - project(":annotations")){
tasks.withType(JavaCompile){
2021-06-14 21:59:38 +07:00
options.compilerArgs.addAll(['--release', '8'])
2020-08-15 06:45:22 +07:00
}
2020-08-23 23:02:45 +07:00
tasks.withType(Javadoc){
2020-10-02 23:06:16 +07:00
options{
addStringOption('Xdoclint:none', '-quiet')
2021-06-14 21:59:38 +07:00
addStringOption('-release', '16')
2022-08-23 02:59:47 +07:00
encoding('UTF-8')
2020-10-02 23:06:16 +07:00
}
2020-08-23 23:02:45 +07:00
}
2020-08-15 06:45:22 +07:00
}
project(":desktop"){
2017-04-30 08:25:59 +07:00
apply plugin: "java"
2020-02-07 22:47:58 +07:00
compileJava.options.fork = true
dependencies{
2020-05-12 23:31:09 +07:00
implementation project(":core")
2021-06-02 22:08:08 +07:00
implementation arcModule("extensions:discord")
2020-05-12 23:31:09 +07:00
implementation arcModule("natives:natives-desktop")
implementation arcModule("natives:natives-freetype-desktop")
2020-05-12 23:31:09 +07:00
if(debugged()) implementation project(":debug")
2020-05-12 23:31:09 +07:00
implementation "com.github.Anuken:steamworks4j:$steamworksVersion"
2019-08-19 02:26:06 +07:00
2020-05-12 23:31:09 +07:00
implementation arcModule("backends:backend-sdl")
}
}
project(":core"){
2020-05-12 23:31:09 +07:00
apply plugin: "java-library"
apply plugin: "kotlin"
apply plugin: "kotlin-kapt"
2021-04-03 11:59:57 +07:00
kapt{
javacOptions{
2021-06-14 21:59:38 +07:00
option("-source", "16")
option("-target", "1.8")
}
}
2017-04-30 08:25:59 +07:00
compileJava.options.fork = true
2019-06-23 21:52:03 +07:00
task preGen{
2019-10-21 04:05:23 +07:00
outputs.upToDateWhen{ false }
generateLocales()
2019-08-26 09:02:00 +07:00
writeVersion()
2020-01-25 06:31:54 +07:00
writeProcessors()
2020-05-28 05:11:42 +07:00
writePlugins()
}
2019-11-20 07:08:41 +07:00
task copyChangelog{
doLast{
def props = loadVersionProps()
def androidVersion = props['androidBuildCode'].toInteger() - 2
def loglines = file("../changelog").text.split("\n")
2020-12-01 06:58:20 +07:00
def notice = "[This is a truncated changelog, see Github for full notes]"
2019-11-20 07:08:41 +07:00
def maxLength = 460
2020-12-01 06:58:20 +07:00
def androidLogList = [notice] + loglines.findAll{ line -> !line.endsWith("]") || line.endsWith("[Mobile]") || line.endsWith("[Android]")}
2019-11-20 07:08:41 +07:00
def result = ""
2020-05-19 02:38:56 +07:00
androidLogList.forEach{line ->
2019-11-20 07:08:41 +07:00
if(result.length() + line.length() + 1 < maxLength){
result += line + "\n"
}
2020-05-19 02:38:56 +07:00
}
2019-11-20 07:08:41 +07:00
def changelogs = file("../fastlane/metadata/android/en-US/changelogs/")
2021-08-02 05:01:36 +07:00
changelogs.mkdirs()
try{
new File(changelogs, androidVersion + ".txt").text = (result)
2021-08-02 05:01:36 +07:00
}catch(Exception ignored){
}
2019-11-20 07:08:41 +07:00
}
}
task sourcesJar(type: Jar, dependsOn: classes){
2021-03-24 23:41:50 +07:00
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
task assetsJar(type: Jar, dependsOn: ":tools:pack"){
2021-03-24 23:41:50 +07:00
archiveClassifier = 'assets'
from files("assets"){
2021-03-24 23:41:50 +07:00
exclude "config", "cache", "music", "sounds"
}
}
task musicJar(type: Jar){
2021-03-24 23:41:50 +07:00
archiveClassifier = 'music'
from files("assets"){
2021-03-24 23:41:50 +07:00
include "music/*", "sounds/*"
}
}
dependencies{
2019-06-23 21:52:03 +07:00
compileJava.dependsOn(preGen)
2019-05-05 22:36:38 +07:00
2022-05-28 18:48:43 +07:00
api "org.lz4:lz4-java:1.8.0"
2020-05-12 23:31:09 +07:00
api arcModule("arc-core")
2021-06-02 22:08:08 +07:00
api arcModule("extensions:flabel")
2020-05-12 23:31:09 +07:00
api arcModule("extensions:freetype")
api arcModule("extensions:g3d")
api arcModule("extensions:fx")
api arcModule("extensions:arcnet")
2020-06-16 10:22:14 +07:00
api "com.github.Anuken:rhino:$rhinoVersion"
2023-10-31 01:56:40 +07:00
if(localArc && debugged()) api arcModule("extensions:recorder")
if(localArc) api arcModule(":extensions:packer")
2022-06-11 22:20:15 +07:00
annotationProcessor 'com.github.Anuken:jabel:0.9.0'
compileOnly project(":annotations")
2023-12-06 01:54:47 +07:00
if(!project.hasProperty("noKapt")) kapt project(":annotations")
2017-04-30 08:25:59 +07:00
}
afterEvaluate{
task mergedJavadoc(type: Javadoc){
def blacklist = [project(":ios"), project(":desktop"), project(":server"), project(":annotations")]
if(findProject(":android") != null){
blacklist += project(":android")
}
source rootProject.subprojects.collect{ project ->
if(!blacklist.contains(project) && project.hasProperty("sourceSets")){
return project.sourceSets.main.allJava
}
}
classpath = files(rootProject.subprojects.collect { project ->
if(!blacklist.contains(project) && project.hasProperty("sourceSets")){
return project.sourceSets.main.compileClasspath
}
})
destinationDir = new File(buildDir, 'javadoc')
}
}
2021-04-03 22:15:41 +07:00
gradle.taskGraph.whenReady{
//these are completely unnecessary
tasks.kaptGenerateStubsKotlin.onlyIf{ false }
tasks.compileKotlin.onlyIf{ false }
I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN I HATE THE ANDROID GRADLE PLUGIN V
2023-09-04 08:52:25 +07:00
tasks.inspectClassesForKotlinIC.onlyIf{ false }
}
2021-04-03 22:15:41 +07:00
//comp** classes are only used for code generation
jar{
exclude("mindustry/entities/comp/**")
}
2017-04-30 08:25:59 +07:00
}
project(":server"){
apply plugin: "java"
dependencies{
2020-05-12 23:31:09 +07:00
implementation project(":core")
implementation arcModule("backends:backend-headless")
}
}
2018-10-04 07:58:35 +07:00
project(":tests"){
apply plugin: "java"
dependencies{
2018-10-04 07:58:35 +07:00
testImplementation project(":core")
testImplementation "org.junit.jupiter:junit-jupiter-params:5.7.1"
testImplementation "org.junit.jupiter:junit-jupiter-api:5.7.1"
2020-05-12 23:31:09 +07:00
testImplementation arcModule("backends:backend-headless")
testImplementation "org.json:json:20230618"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.7.1"
2018-10-04 07:58:35 +07:00
}
test{
//fork every test so mods don't interact with each other
forkEvery = 1
2018-10-04 07:58:35 +07:00
useJUnitPlatform()
workingDir = new File("../core/assets")
2021-06-02 22:08:08 +07:00
testLogging{
2020-05-08 01:35:24 +07:00
exceptionFormat = 'full'
2020-08-14 07:28:36 +07:00
showStandardStreams = true
2020-05-08 01:35:24 +07:00
}
2018-10-04 07:58:35 +07:00
}
}
project(":tools"){
2018-06-16 05:06:05 +07:00
apply plugin: "java"
dependencies{
2020-05-12 23:31:09 +07:00
implementation project(":core")
2019-06-21 03:27:57 +07:00
2020-05-12 23:31:09 +07:00
implementation arcModule("natives:natives-desktop")
implementation arcModule("natives:natives-freetype-desktop")
implementation arcModule("backends:backend-headless")
2018-06-16 05:06:05 +07:00
}
}
project(":annotations"){
2020-05-12 23:31:09 +07:00
apply plugin: "java-library"
dependencies{
2020-05-12 23:31:09 +07:00
implementation 'com.squareup:javapoet:1.12.1'
2023-11-07 08:54:58 +07:00
implementation arcModule("arc-core")
}
}
2022-05-11 06:43:47 +07:00
configure([":core", ":server"].collect{project(it)}){
2021-06-02 22:08:08 +07:00
java{
withJavadocJar()
withSourcesJar()
}
publishing{
2022-05-11 07:08:48 +07:00
publications{
maven(MavenPublication){
from components.java
2023-05-27 20:05:08 +07:00
if(project.name == "core"){
artifact(tasks.named("assetsJar"))
}
2021-06-02 22:08:08 +07:00
}
}
}
}
2019-08-22 01:46:36 +07:00
task deployAll{
task cleanDeployOutput{
doFirst{
2020-05-12 23:32:53 +07:00
if(getBuildVersion() == "custom build" || getBuildVersion() == "") throw new IllegalArgumentException("----\n\nSET A BUILD NUMBER FIRST!\n\n----")
2019-08-22 01:46:36 +07:00
if(!project.hasProperty("release")) throw new IllegalArgumentException("----\n\nSET THE RELEASE PROJECT PROPERTY FIRST!\n\n----")
delete{
delete "deploy/"
}
}
}
dependsOn cleanDeployOutput
dependsOn "desktop:packrLinux64"
dependsOn "desktop:packrWindows64"
dependsOn "desktop:packrWindows32"
dependsOn "desktop:packrMacOS"
2021-07-01 22:36:51 +07:00
if(versionModifier != "steam"){
dependsOn "server:deploy"
dependsOn "android:deploy"
}
2019-09-02 23:40:52 +07:00
}
task resolveDependencies{
doLast{
2021-01-11 04:33:20 +07:00
rootProject.allprojects{ project ->
Set<Configuration> configurations = project.buildscript.configurations + project.configurations
2021-01-11 04:33:20 +07:00
configurations.findAll{c -> c.canBeResolved}.forEach{c -> c.resolve()}
}
}
}