2021-06-16 21:57:52 +02:00
|
|
|
plugins {
|
2023-11-23 05:56:29 +01:00
|
|
|
id 'eclipse'
|
|
|
|
id 'idea'
|
2024-04-17 21:05:04 +02:00
|
|
|
// make sure gradle loads the same arch plugin across all subprojects
|
|
|
|
id 'dev.architectury.loom' apply false
|
2021-06-16 21:57:52 +02:00
|
|
|
}
|
|
|
|
|
2023-11-23 05:56:29 +01:00
|
|
|
println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
|
2021-06-16 21:57:52 +02:00
|
|
|
|
2024-04-17 21:05:04 +02:00
|
|
|
subprojects {
|
|
|
|
boolean dev = System.getenv('RELEASE') == null || System.getenv('RELEASE').equalsIgnoreCase('false');
|
2023-11-23 05:56:29 +01:00
|
|
|
|
2024-04-17 21:05:04 +02:00
|
|
|
ext.buildNumber = System.getenv('BUILD_NUMBER')
|
2021-06-16 21:57:52 +02:00
|
|
|
|
2024-04-17 21:05:04 +02:00
|
|
|
group = 'com.jozufozu.flywheel'
|
|
|
|
version = mod_version + (dev && buildNumber != null ? "-${buildNumber}" : '')
|
2023-11-23 05:56:29 +01:00
|
|
|
|
2024-04-17 21:05:04 +02:00
|
|
|
tasks {
|
|
|
|
// make builds reproducible
|
|
|
|
withType(AbstractArchiveTask).configureEach {
|
|
|
|
preserveFileTimestamps = false
|
|
|
|
reproducibleFileOrder = true
|
2021-06-16 21:57:52 +02:00
|
|
|
}
|
|
|
|
|
2024-04-17 21:05:04 +02:00
|
|
|
// module metadata is often broken on multi-platform projects
|
|
|
|
withType(GenerateModuleMetadata).configureEach {
|
|
|
|
enabled = false
|
2021-06-16 21:57:52 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-01-15 23:09:19 +01:00
|
|
|
idea {
|
|
|
|
// Tell IDEA to always download sources/javadoc artifacts from maven.
|
|
|
|
module {
|
|
|
|
downloadJavadoc = true
|
|
|
|
downloadSources = true
|
|
|
|
}
|
|
|
|
}
|