-
Notifications
You must be signed in to change notification settings - Fork 20
/
build.gradle
78 lines (69 loc) · 2.44 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
buildscript {
repositories {
mavenCentral()
maven { url 'https://s01.oss.sonatype.org' }
gradlePluginPortal()
mavenLocal()
google()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' }
}
dependencies {
classpath "com.android.tools.build:gradle:8.1.4"
}
}
allprojects {
apply plugin: 'eclipse'
apply plugin: 'idea'
// This allows you to "Build and run using IntelliJ IDEA", an option in IDEA's Settings.
idea {
module {
outputDir file('build/classes/java/main')
testOutputDir file('build/classes/java/test')
}
}
}
configure(subprojects - project(':android')) {
apply plugin: 'java-library'
/*
* Newer Java versions technically work but only some APIs work on older Android versions via desugaring.
* I would only upgrade if there was an automatic check to prevent compatibility issues.
* There is the Android lint tool that can be called via a Gradle task but I couldn't get it to scan the core classes.
*/
sourceCompatibility = 8
// From https://lyze.dev/2021/04/29/libGDX-Internal-Assets-List/
// The article can be helpful when using assets.txt in your project.
tasks.register('generateAssetList') {
inputs.dir("${project.rootDir}/assets/")
// projectFolder/assets
File assetsFolder = new File("${project.rootDir}/assets/")
// projectFolder/assets/assets.txt
File assetsFile = new File(assetsFolder, "assets.txt")
// delete that file in case we've already created it
assetsFile.delete()
// iterate through all files inside that folder
// convert it to a relative path
// and append it to the file assets.txt
fileTree(assetsFolder).collect { assetsFolder.relativePath(it) }.each {
assetsFile.append(it + "\n")
}
}
processResources.dependsOn 'generateAssetList'
compileJava {
options.incremental = true
}
}
subprojects {
version = '$projectVersion'
ext.appName = 'FeudalTactics'
repositories {
mavenCentral()
maven { url 'https://s01.oss.sonatype.org' }
// You may want to remove the following line if you have errors downloading dependencies.
mavenLocal()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' }
maven { url 'https://jitpack.io' }
}
}
eclipse.project.name = 'FeudalTactics' + '-parent'