mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-01-11 23:06:09 +01:00
Wait, it's all kotlin?
- Port to kotlin gradle
This commit is contained in:
parent
a44e7f5205
commit
f25d66680e
12 changed files with 264 additions and 456 deletions
16
build.gradle
16
build.gradle
|
@ -1,16 +0,0 @@
|
|||
plugins {
|
||||
id 'idea'
|
||||
id 'java'
|
||||
id 'maven-publish'
|
||||
id 'dev.architectury.loom' apply false
|
||||
}
|
||||
|
||||
println("Java: ${System.getProperty('java.version')}, JVM: ${System.getProperty('java.vm.version')} (${System.getProperty('java.vendor')}), Arch: ${System.getProperty('os.arch')}")
|
||||
|
||||
idea {
|
||||
// Tell IDEA to always download sources/javadoc artifacts from maven.
|
||||
module {
|
||||
downloadJavadoc = true
|
||||
downloadSources = true
|
||||
}
|
||||
}
|
15
build.gradle.kts
Normal file
15
build.gradle.kts
Normal file
|
@ -0,0 +1,15 @@
|
|||
plugins {
|
||||
idea
|
||||
java
|
||||
id("dev.architectury.loom") apply false
|
||||
}
|
||||
|
||||
println("Java: ${System.getProperty("java.version")}, JVM: ${System.getProperty("java.vm.version")} (${System.getProperty("java.vendor")}), Arch: ${System.getProperty("os.arch")}")
|
||||
|
||||
idea {
|
||||
// Tell IDEA to always download sources/javadoc artifacts from maven.
|
||||
module {
|
||||
isDownloadJavadoc = true
|
||||
isDownloadSources = true
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
plugins {
|
||||
id("java-gradle-plugin")
|
||||
kotlin("jvm") version "1.9.20"
|
||||
kotlin("jvm") version "1.9.23"
|
||||
`kotlin-dsl`
|
||||
}
|
||||
|
||||
|
|
|
@ -1,74 +0,0 @@
|
|||
plugins {
|
||||
id 'idea'
|
||||
id 'java'
|
||||
id 'maven-publish'
|
||||
id 'dev.architectury.loom'
|
||||
id 'flywheel.package-infos'
|
||||
id 'flywheel.subproject'
|
||||
id 'flywheel.jar-sets'
|
||||
id 'flywheel.transitive-source-sets'
|
||||
}
|
||||
|
||||
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) {
|
||||
compile sourceSets.api, sourceSets.lib, sourceSets.backend
|
||||
}
|
||||
sourceSet(sourceSets.test) {
|
||||
implementation sourceSets.api, sourceSets.lib, sourceSets.backend
|
||||
}
|
||||
}
|
||||
|
||||
defaultPackageInfos {
|
||||
sources sourceSets.api, sourceSets.lib, sourceSets.backend, sourceSets.main
|
||||
}
|
||||
|
||||
// For sharing with other subprojects.
|
||||
jarSets {
|
||||
createJars('apiOnly', sourceSets.api).createOutgoingConfiguration('common')
|
||||
createJars('lib').createOutgoingConfiguration('common')
|
||||
createJars('backend').createOutgoingConfiguration('common')
|
||||
createJars('impl', sourceSets.main).createOutgoingConfiguration('common')
|
||||
}
|
||||
|
||||
// For publishing
|
||||
def apiLibJar = jarSets.createJars('api', sourceSets.api, sourceSets.lib)
|
||||
|
||||
dependencies {
|
||||
modCompileOnly "net.fabricmc:fabric-loader:${fabric_loader_version}"
|
||||
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.1'
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
register('mavenIntermediary', MavenPublication) {
|
||||
artifact apiLibJar.remapJar
|
||||
artifact apiLibJar.remapSources
|
||||
artifact apiLibJar.javadocJar
|
||||
artifactId = "flywheel-common-intermediary-api-${artifact_minecraft_version}"
|
||||
}
|
||||
register('mavenMojmap', MavenPublication) {
|
||||
artifact apiLibJar.jar
|
||||
artifact apiLibJar.sources
|
||||
artifact apiLibJar.javadocJar
|
||||
artifactId = "flywheel-common-mojmap-api-${artifact_minecraft_version}"
|
||||
}
|
||||
}
|
||||
}
|
79
common/build.gradle.kts
Normal file
79
common/build.gradle.kts
Normal file
|
@ -0,0 +1,79 @@
|
|||
plugins {
|
||||
idea
|
||||
java
|
||||
`maven-publish`
|
||||
id("dev.architectury.loom")
|
||||
id("flywheel.package-infos")
|
||||
id("flywheel.subproject")
|
||||
id("flywheel.jar-sets")
|
||||
id("flywheel.transitive-source-sets")
|
||||
}
|
||||
|
||||
val api = sourceSets.create("api")
|
||||
val lib = sourceSets.create("lib")
|
||||
val backend = sourceSets.create("backend")
|
||||
val main = sourceSets.getByName("main")
|
||||
|
||||
transitiveSourceSets {
|
||||
compileClasspath = main.compileClasspath
|
||||
|
||||
sourceSet(api) {
|
||||
rootCompile()
|
||||
}
|
||||
sourceSet(lib) {
|
||||
rootCompile()
|
||||
compile(api)
|
||||
}
|
||||
sourceSet(backend) {
|
||||
rootCompile()
|
||||
compile(api, lib)
|
||||
}
|
||||
sourceSet(main) {
|
||||
compile(api, lib, backend)
|
||||
}
|
||||
sourceSet(sourceSets.getByName("test")) {
|
||||
implementation(api, lib, backend)
|
||||
}
|
||||
}
|
||||
|
||||
defaultPackageInfos {
|
||||
sources(api, lib, backend, main)
|
||||
}
|
||||
|
||||
// For sharing with other subprojects.
|
||||
jarSets {
|
||||
createJars("apiOnly", api).createOutgoingConfiguration("common")
|
||||
createJars("lib").createOutgoingConfiguration("common")
|
||||
createJars("backend").createOutgoingConfiguration("common")
|
||||
createJars("impl", main).createOutgoingConfiguration("common")
|
||||
}
|
||||
|
||||
// For publishing
|
||||
val apiLibJar = jarSets.createJars("api", api, lib)
|
||||
|
||||
dependencies {
|
||||
modCompileOnly("net.fabricmc:fabric-loader:${property("fabric_loader_version")}")
|
||||
|
||||
testImplementation("org.junit.jupiter:junit-jupiter:5.8.1")
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
register<MavenPublication>("mavenIntermediary") {
|
||||
artifact(apiLibJar.remapJar)
|
||||
artifact(apiLibJar.remapSources)
|
||||
artifact(apiLibJar.javadocJar)
|
||||
artifactId = "flywheel-common-intermediary-api-${property("artifact_minecraft_version")}"
|
||||
}
|
||||
register<MavenPublication>("mavenMojmap") {
|
||||
artifact(apiLibJar.jar)
|
||||
artifact(apiLibJar.sources)
|
||||
artifact(apiLibJar.javadocJar)
|
||||
artifactId = "flywheel-common-mojmap-api-${property("artifact_minecraft_version")}"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
plugins {
|
||||
id 'idea'
|
||||
id 'java'
|
||||
id 'maven-publish'
|
||||
id 'dev.architectury.loom'
|
||||
id 'flywheel.package-infos'
|
||||
id 'flywheel.subproject'
|
||||
id 'flywheel.platform'
|
||||
id 'flywheel.jar-sets'
|
||||
id 'flywheel.transitive-source-sets'
|
||||
}
|
||||
|
||||
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()
|
||||
}
|
||||
|
||||
platform {
|
||||
commonProject = project(':common')
|
||||
sources sourceSets.api, sourceSets.lib, sourceSets.backend, sourceSets.main
|
||||
compileWithCommonSourceSets()
|
||||
setupLoomMod()
|
||||
setupLoomRuns()
|
||||
setupFatJar()
|
||||
publishMod()
|
||||
publishRemap(apiArtifactId, jarSets.createJars('api', sourceSets.api, sourceSets.lib))
|
||||
}
|
||||
|
||||
defaultPackageInfos {
|
||||
sources sourceSets.api, sourceSets.lib, sourceSets.backend, sourceSets.main
|
||||
}
|
||||
|
||||
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')
|
||||
}
|
65
fabric/build.gradle.kts
Normal file
65
fabric/build.gradle.kts
Normal file
|
@ -0,0 +1,65 @@
|
|||
plugins {
|
||||
idea
|
||||
java
|
||||
`maven-publish`
|
||||
id("dev.architectury.loom")
|
||||
id("flywheel.package-infos")
|
||||
id("flywheel.subproject")
|
||||
id("flywheel.platform")
|
||||
id("flywheel.jar-sets")
|
||||
id("flywheel.transitive-source-sets")
|
||||
}
|
||||
|
||||
val api = sourceSets.create("api")
|
||||
val lib = sourceSets.create("lib")
|
||||
val backend = sourceSets.create("backend")
|
||||
val main = sourceSets.getByName("main")
|
||||
|
||||
transitiveSourceSets {
|
||||
compileClasspath = main.compileClasspath
|
||||
|
||||
sourceSet(api) {
|
||||
rootCompile()
|
||||
}
|
||||
sourceSet(lib) {
|
||||
rootCompile()
|
||||
compile(api)
|
||||
}
|
||||
sourceSet(backend) {
|
||||
rootCompile()
|
||||
compile(api, lib)
|
||||
}
|
||||
sourceSet(main) {
|
||||
implementation(api, lib, backend)
|
||||
}
|
||||
|
||||
createCompileConfigurations()
|
||||
}
|
||||
|
||||
platform {
|
||||
commonProject = project(":common")
|
||||
sources(api, lib, backend, main)
|
||||
compileWithCommonSourceSets()
|
||||
setupLoomMod()
|
||||
setupLoomRuns()
|
||||
setupFatJar()
|
||||
publishMod()
|
||||
publishRemap(apiArtifactId, jarSets.createJars("api", api, lib))
|
||||
}
|
||||
|
||||
defaultPackageInfos {
|
||||
sources(api, lib, backend, main)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
modImplementation("net.fabricmc:fabric-loader:${property("fabric_loader_version")}")
|
||||
modApi("net.fabricmc.fabric-api:fabric-api:${property("fabric_api_version")}")
|
||||
|
||||
modCompileOnly("maven.modrinth:sodium:${property("sodium_version")}")
|
||||
modCompileOnly("maven.modrinth:iris:${property("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"))
|
||||
}
|
|
@ -1,74 +0,0 @@
|
|||
plugins {
|
||||
id 'idea'
|
||||
id 'java'
|
||||
id 'maven-publish'
|
||||
id 'dev.architectury.loom'
|
||||
id 'flywheel.package-infos'
|
||||
id 'flywheel.subproject'
|
||||
id 'flywheel.platform'
|
||||
id 'flywheel.jar-sets'
|
||||
id 'flywheel.transitive-source-sets'
|
||||
}
|
||||
|
||||
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) {
|
||||
compile sourceSets.api, sourceSets.lib, sourceSets.backend
|
||||
}
|
||||
|
||||
createCompileConfigurations()
|
||||
}
|
||||
|
||||
platform {
|
||||
commonProject = project(':common')
|
||||
sources sourceSets.api, sourceSets.lib, sourceSets.backend, sourceSets.main
|
||||
compileWithCommonSourceSets()
|
||||
setupLoomMod()
|
||||
setupLoomRuns()
|
||||
setupFatJar()
|
||||
publishMod()
|
||||
publishRemap(apiArtifactId, jarSets.createJars('api', sourceSets.api, sourceSets.lib))
|
||||
}
|
||||
|
||||
defaultPackageInfos {
|
||||
sources sourceSets.api, sourceSets.lib, sourceSets.backend, sourceSets.main
|
||||
}
|
||||
|
||||
loom {
|
||||
forge {
|
||||
mixinConfig 'flywheel.backend.mixins.json'
|
||||
mixinConfig 'flywheel.impl.mixins.json'
|
||||
mixinConfig 'flywheel.impl.sodium.mixins.json'
|
||||
}
|
||||
|
||||
runs {
|
||||
configureEach {
|
||||
property 'forge.logging.markers', ''
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
forge "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
|
||||
|
||||
modCompileOnly "maven.modrinth:embeddium:${embeddium_version}"
|
||||
modCompileOnly "maven.modrinth:oculus:${oculus_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')
|
||||
}
|
79
forge/build.gradle.kts
Normal file
79
forge/build.gradle.kts
Normal file
|
@ -0,0 +1,79 @@
|
|||
plugins {
|
||||
idea
|
||||
java
|
||||
`maven-publish`
|
||||
id("dev.architectury.loom")
|
||||
id("flywheel.package-infos")
|
||||
id("flywheel.subproject")
|
||||
id("flywheel.platform")
|
||||
id("flywheel.jar-sets")
|
||||
id("flywheel.transitive-source-sets")
|
||||
}
|
||||
|
||||
val api = sourceSets.create("api")
|
||||
val lib = sourceSets.create("lib")
|
||||
val backend = sourceSets.create("backend")
|
||||
val main = sourceSets.getByName("main")
|
||||
|
||||
transitiveSourceSets {
|
||||
compileClasspath = main.compileClasspath
|
||||
|
||||
sourceSet(api) {
|
||||
rootCompile()
|
||||
}
|
||||
sourceSet(lib) {
|
||||
rootCompile()
|
||||
compile(api)
|
||||
}
|
||||
sourceSet(backend) {
|
||||
rootCompile()
|
||||
compile(api, lib)
|
||||
}
|
||||
sourceSet(main) {
|
||||
compile(api, lib, backend)
|
||||
}
|
||||
|
||||
createCompileConfigurations()
|
||||
}
|
||||
|
||||
platform {
|
||||
commonProject = project(":common")
|
||||
sources(api, lib, backend, main)
|
||||
compileWithCommonSourceSets()
|
||||
setupLoomMod()
|
||||
setupLoomRuns()
|
||||
setupFatJar()
|
||||
publishMod()
|
||||
publishRemap(apiArtifactId, jarSets.createJars("api", api, lib))
|
||||
}
|
||||
|
||||
defaultPackageInfos {
|
||||
sources(api, lib, backend, main)
|
||||
}
|
||||
|
||||
loom {
|
||||
forge {
|
||||
mixinConfig("flywheel.backend.mixins.json")
|
||||
mixinConfig("flywheel.impl.mixins.json")
|
||||
mixinConfig("flywheel.impl.sodium.mixins.json")
|
||||
}
|
||||
|
||||
runs {
|
||||
configureEach {
|
||||
property("forge.logging.markers", "")
|
||||
property("forge.logging.console.level", "debug")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
forge("net.minecraftforge:forge:${property("minecraft_version")}-${property("forge_version")}")
|
||||
|
||||
modCompileOnly("maven.modrinth:embeddium:${property("embeddium_version")}")
|
||||
modCompileOnly("maven.modrinth:oculus:${property("oculus_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"))
|
||||
}
|
205
old.build.gradle
205
old.build.gradle
|
@ -1,205 +0,0 @@
|
|||
plugins {
|
||||
id 'eclipse'
|
||||
id 'idea'
|
||||
id 'maven-publish'
|
||||
id 'net.minecraftforge.gradle' version "${forgegradle_version}"
|
||||
id 'org.parchmentmc.librarian.forgegradle' version "${librarian_version}"
|
||||
id 'org.spongepowered.mixin' version "${mixingradle_version}"
|
||||
}
|
||||
|
||||
boolean dev = System.getenv('RELEASE') == null || System.getenv('RELEASE').equalsIgnoreCase('false');
|
||||
|
||||
ext.buildNumber = System.getenv('BUILD_NUMBER')
|
||||
|
||||
group = 'com.jozufozu.flywheel'
|
||||
archivesBaseName = "flywheel-forge-${artifact_minecraft_version}"
|
||||
version = mod_version + (dev && buildNumber != null ? "-${buildNumber}" : '')
|
||||
|
||||
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
||||
|
||||
println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
|
||||
minecraft {
|
||||
mappings channel: 'parchment', version: "${parchment_version}-${minecraft_version}"
|
||||
|
||||
copyIdeResources = true
|
||||
|
||||
runs {
|
||||
configureEach {
|
||||
workingDirectory project.file('run')
|
||||
|
||||
property 'forge.logging.markers', ''
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
|
||||
property 'mixin.env.remapRefMap', 'true'
|
||||
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
|
||||
|
||||
mods {
|
||||
flywheel {
|
||||
source sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
client {
|
||||
property 'flw.dumpShaderSource', 'true'
|
||||
property 'flw.debugMemorySafety', 'true'
|
||||
}
|
||||
|
||||
server {
|
||||
args '--nogui'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url 'https://www.cursemaven.com'
|
||||
content {
|
||||
includeGroup "curse.maven"
|
||||
}
|
||||
}
|
||||
maven {
|
||||
name 'tterrag maven'
|
||||
url 'https://maven.tterrag.com/'
|
||||
}
|
||||
maven {
|
||||
name = "Modrinth"
|
||||
url = "https://api.modrinth.com/maven"
|
||||
content {
|
||||
includeGroup "maven.modrinth"
|
||||
}
|
||||
}
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.1'
|
||||
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
|
||||
|
||||
compileOnly fg.deobf("maven.modrinth:embeddium:0.3.9+mc1.20.1")
|
||||
compileOnly fg.deobf("maven.modrinth:oculus:1.20.1-1.6.15a")
|
||||
// implementation fg.deobf("maven.modrinth:starlight-forge:1.1.2+1.20")
|
||||
|
||||
// https://discord.com/channels/313125603924639766/725850371834118214/910619168821354497
|
||||
// Prevent Mixin annotation processor from getting into IntelliJ's annotation processor settings
|
||||
// This allows 'Settings > Build, Execution, and Deployment > Build Tools > Gradle > Build and run using' set to IntelliJ to work correctly
|
||||
// if (System.getProperty('idea.sync.active') != 'true') {
|
||||
annotationProcessor "org.spongepowered:mixin:${mixin_version}:processor"
|
||||
// }
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
mixin {
|
||||
add sourceSets.main, 'flywheel.refmap.json'
|
||||
|
||||
config 'flywheel.backend.mixins.json'
|
||||
config 'flywheel.impl.mixins.json'
|
||||
config 'flywheel.impl.sodium.mixins.json'
|
||||
|
||||
debug.verbose = true
|
||||
debug.export = true
|
||||
}
|
||||
|
||||
idea {
|
||||
// Tell IDEA to always download sources/javadoc artifacts from maven.
|
||||
module {
|
||||
downloadJavadoc = true
|
||||
downloadSources = true
|
||||
}
|
||||
}
|
||||
|
||||
// Workaround for SpongePowered/MixinGradle#38
|
||||
afterEvaluate {
|
||||
tasks.configureReobfTaskForReobfJar.mustRunAfter(tasks.compileJava)
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
|
||||
}
|
||||
|
||||
javadoc {
|
||||
source = [sourceSets.main.allJava]
|
||||
// prevent java 8's strict doclint for javadocs from failing builds
|
||||
options.addStringOption('Xdoclint:none', '-quiet')
|
||||
}
|
||||
|
||||
compileJava {
|
||||
options.compilerArgs = ['-Xdiags:verbose']
|
||||
}
|
||||
|
||||
tasks.named('processResources', ProcessResources).configure {
|
||||
var replaceProperties = [
|
||||
minecraft_version : minecraft_version,
|
||||
minecraft_version_range: minecraft_version_range,
|
||||
forge_version : forge_version,
|
||||
forge_version_range : forge_version_range,
|
||||
loader_version_range : loader_version_range,
|
||||
mod_version : mod_version
|
||||
]
|
||||
inputs.properties replaceProperties
|
||||
|
||||
filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) {
|
||||
expand replaceProperties + [project: project]
|
||||
}
|
||||
}
|
||||
|
||||
apply from: rootProject.file('gradle/package-infos.gradle')
|
||||
|
||||
void addLicense(jarTask) {
|
||||
jarTask.from('LICENSE.md') {
|
||||
rename '(.*)\\.(.*)', '$1_' + archivesBaseName + '.$2'
|
||||
}
|
||||
}
|
||||
|
||||
void addManifest(jarTask) {
|
||||
jarTask.manifest {
|
||||
attributes([
|
||||
'Specification-Title' : 'flywheel',
|
||||
// 'Specification-Vendor': 'flywheel authors',
|
||||
'Specification-Version' : '1', // We are version 1 of ourselves
|
||||
'Implementation-Title' : project.jar.archiveBaseName,
|
||||
'Implementation-Version' : project.jar.archiveVersion,
|
||||
// 'Implementation-Vendor': 'flywheel authors',
|
||||
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named('jar', Jar).configure {
|
||||
archiveClassifier = ''
|
||||
|
||||
finalizedBy 'reobfJar'
|
||||
addManifest(it)
|
||||
addLicense(it)
|
||||
}
|
||||
|
||||
java {
|
||||
withSourcesJar()
|
||||
withJavadocJar()
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
register('mavenJava', MavenPublication) {
|
||||
artifact jar
|
||||
artifact sourcesJar
|
||||
artifact javadocJar
|
||||
|
||||
artifactId = archivesBaseName
|
||||
|
||||
fg.component(it)
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
url "file://${project.projectDir}/mcmodsrepo"
|
||||
}
|
||||
|
||||
if (project.hasProperty('mavendir')) {
|
||||
maven { url mavendir }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
maven {
|
||||
name = 'MinecraftForge'
|
||||
url = 'https://maven.minecraftforge.net/'
|
||||
}
|
||||
maven {
|
||||
name = 'Architectury'
|
||||
url = 'https://maven.architectury.dev/'
|
||||
}
|
||||
maven { url = 'https://repo.spongepowered.org/repository/maven-public' }
|
||||
maven { url = 'https://maven.parchmentmc.org' }
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'dev.architectury.loom' version arch_loom_version
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = 'Flywheel'
|
||||
|
||||
include('common')
|
||||
include('fabric')
|
||||
include('forge')
|
25
settings.gradle.kts
Normal file
25
settings.gradle.kts
Normal file
|
@ -0,0 +1,25 @@
|
|||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
maven("https://maven.minecraftforge.net/") {
|
||||
name = "MinecraftForge"
|
||||
}
|
||||
maven("https://maven.architectury.dev/") {
|
||||
name = "Architectury"
|
||||
}
|
||||
maven("https://repo.spongepowered.org/repository/maven-public")
|
||||
maven("https://maven.parchmentmc.org")
|
||||
}
|
||||
|
||||
plugins {
|
||||
val arch_loom_version: String by settings
|
||||
id("dev.architectury.loom") version arch_loom_version
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "Flywheel"
|
||||
|
||||
include("common")
|
||||
include("fabric")
|
||||
include("forge")
|
Loading…
Reference in a new issue