Skip to content

Commit

Permalink
fix loom version getting (#254)
Browse files Browse the repository at this point in the history
* fix loom version getting
very cursed but it works :)

* remove commented out stuff in settings.gradle.kts, unnecessary plugins in buildSrc, and configure buildSrc to download sources/javadoc
  • Loading branch information
rhysdh540 authored Sep 10, 2024
1 parent 14ca1d3 commit fb41248
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ local.properties
.buildpath

# Other
.DS_Store
mcmodsrepo
src/*/generatedPackageInfos/
*/src/*/generatedPackageInfos/
19 changes: 15 additions & 4 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import java.util.Properties

plugins {
id("java-gradle-plugin")
kotlin("jvm") version "1.9.23"
`kotlin-dsl`
idea
}

repositories {
Expand All @@ -17,6 +18,11 @@ repositories {
maven("https://maven.parchmentmc.org")
}

idea.module {
isDownloadJavadoc = true
isDownloadSources = true
}

gradlePlugin {
plugins {
create("platformPlugin") {
Expand All @@ -30,7 +36,12 @@ gradlePlugin {
}
}

val properties by lazy {
Properties().apply {
load(rootDir.parentFile.resolve("gradle.properties").inputStream())
}
}

dependencies {
// FIXME: This should not hard-code the Loom version.
implementation("dev.architectury.loom:dev.architectury.loom.gradle.plugin:1.6.397")
implementation("dev.architectury.loom:dev.architectury.loom.gradle.plugin:${properties["arch_loom_version"]}")
}
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ forge_version_range = [47.0.0,)

# General build dependency versions
java_version = 17
# FIXME: This doesn't do anything.
# arch_loom_version = 1.6-SNAPSHOT
arch_loom_version = 1.6.397
cursegradle_version = 1.4.0
parchment_version = 2023.09.03

Expand Down
6 changes: 0 additions & 6 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ pluginManagement {
maven("https://repo.spongepowered.org/repository/maven-public")
maven("https://maven.parchmentmc.org")
}

// FIXME: This doesn't do anything. The actual version is always the one defined in buildSrc/build.gradle.kts.
// plugins {
// val arch_loom_version: String by settings
// id("dev.architectury.loom") version arch_loom_version
// }
}

rootProject.name = "Flywheel"
Expand Down

0 comments on commit fb41248

Please sign in to comment.