mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-11-10 12:34:11 +01:00
2072bea11b
- Upgrade buildSrc to kotlin buildscript - Add TransitiveSourceSet extension to abstract creating the different source sets and creating the configurations to apply dependencies
77 lines
2.0 KiB
Groovy
77 lines
2.0 KiB
Groovy
plugins {
|
|
id 'idea'
|
|
id 'java'
|
|
id 'maven-publish'
|
|
id 'dev.architectury.loom'
|
|
id 'flywheel.java'
|
|
id 'flywheel.package-infos'
|
|
id 'flywheel.subproject'
|
|
id 'flywheel.platform'
|
|
id 'flywheel.transitive-source-sets'
|
|
}
|
|
|
|
evaluationDependsOn(':common')
|
|
|
|
transitiveSourceSets {
|
|
compileClasspath = sourceSets.main.compileClasspath
|
|
|
|
create('api') {
|
|
rootCompile()
|
|
}
|
|
create('lib') {
|
|
rootCompile()
|
|
compile sourceSets.api
|
|
}
|
|
create('backend') {
|
|
rootCompile()
|
|
compile sourceSets.api, sourceSets.lib
|
|
}
|
|
sourceSet(sourceSets.main) {
|
|
implementation sourceSets.api, sourceSets.lib, sourceSets.backend
|
|
}
|
|
|
|
createCompileConfigurations()
|
|
}
|
|
|
|
defaultPackageInfos {
|
|
forSourceSets sourceSets.api, sourceSets.lib, sourceSets.backend, sourceSets.main
|
|
}
|
|
|
|
loom {
|
|
runs {
|
|
client {
|
|
ideConfigGenerated true
|
|
|
|
// Turn on our own debug flags
|
|
property 'flw.dumpShaderSource', 'true'
|
|
property 'flw.debugMemorySafety', 'true'
|
|
|
|
// Turn on mixin debug flags
|
|
property 'mixin.debug.export', 'true'
|
|
property 'mixin.debug.verbose', 'true'
|
|
|
|
// 720p baby!
|
|
programArgs '--width', '1280', '--height', '720'
|
|
}
|
|
|
|
// We're a client mod, but we need to make sure we correctly render when playing on a server.
|
|
server {
|
|
ideConfigGenerated true
|
|
programArgs '--nogui'
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}"
|
|
modApi "net.fabricmc.fabric-api:fabric-api:${fabric_api_version}"
|
|
|
|
modCompileOnly "maven.modrinth:sodium:${sodium_version}"
|
|
modCompileOnly "maven.modrinth:iris:${iris_version}"
|
|
|
|
forApi project(path: ':common', configuration: 'commonApiOnly')
|
|
forLib project(path: ':common', configuration: 'commonLib')
|
|
forBackend project(path: ':common', configuration: 'commonBackend')
|
|
forMain project(path: ':common', configuration: 'commonImpl')
|
|
}
|