diff options
| author | Elizabeth Alexander Hunt <me@liz.coffee> | 2026-02-22 14:48:06 -0800 |
|---|---|---|
| committer | Elizabeth Alexander Hunt <me@liz.coffee> | 2026-02-22 14:48:06 -0800 |
| commit | c9c7e69714707262e8bdea25853bf33447a57951 (patch) | |
| tree | 6d1e4b317c7e5896be5d719649c4b6c4df09a93f /build.gradle | |
| download | dyl-c9c7e69714707262e8bdea25853bf33447a57951.tar.gz dyl-c9c7e69714707262e8bdea25853bf33447a57951.zip | |
Initialization
Diffstat (limited to 'build.gradle')
| -rw-r--r-- | build.gradle | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..072a5c9 --- /dev/null +++ b/build.gradle @@ -0,0 +1,69 @@ +buildscript { + repositories { + mavenCentral() + gradlePluginPortal() + mavenLocal() + google() + maven { url = 'https://central.sonatype.com/repository/maven-snapshots/' } + } + dependencies { + + + } +} + +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) { + apply plugin: 'java-library' + java.sourceCompatibility = 17 + + // 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) }.sort().each { + assetsFile.append(it + "\n") + } + } + processResources.dependsOn 'generateAssetList' + + compileJava { + options.incremental = true + } +} + +subprojects { + version = "$projectVersion" + ext.appName = 'dyl' + repositories { + mavenCentral() + // You may want to remove the following line if you have errors downloading dependencies. + mavenLocal() + maven { url = 'https://central.sonatype.com/repository/maven-snapshots/' } + maven { url = 'https://jitpack.io' } + } +} + +eclipse.project.name = 'dyl' + '-parent' |
