Skip to content

Commit

Permalink
Revert "simplify dependency setup for publishing"
Browse files Browse the repository at this point in the history
This reverts commit 322348e.
  • Loading branch information
Erdragh committed Oct 11, 2023
1 parent 3313bb0 commit b8ecd71
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 30 deletions.
12 changes: 4 additions & 8 deletions gradle/publishing/curseforge.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,10 @@ curseforge {
addGameVersion(minecraft_version)

relations {
for (dependency in (depends as List<String>)) {
var optionalDep = dependency.endsWith("?")
if (optionalDep) {
optionalDependency(dependency.replace("?", ""))
} else {
requiredDependency(dependency)
}
}
requiredDependency("fabric-api")
requiredDependency("fabric-language-kotlin")
requiredDependency("forge-config-api-port-fabric")
optionalDependency("roughly-enough-items")
}

// https://github.com/mraliscoder/plasmo-voice/blob/41243bc77589d975acde5385dd86414b1c92a2a8/fabric/build.gradle.kts#L173
Expand Down
12 changes: 4 additions & 8 deletions gradle/publishing/modrinth.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,10 @@ modrinth {
gameVersions = [ minecraft_version ]
loaders = ["fabric"]
dependencies {
for (dependency in (depends as List<String>)) {
var optionalDep = dependency.endsWith("?")
if (optionalDep) {
optional.project(dependency.replace("?", ""))
} else {
required.project(dependency)
}
}
required.project "fabric-api"
required.project "fabric-language-kotlin"
required.project "forge-config-api-port"
optional.project "rei"
}
}

Expand Down
13 changes: 0 additions & 13 deletions gradle/publishing/publishing.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ ext /*-ra properties*/ {
Properties properties = new Properties()
properties.load(new FileInputStream(file("gradle/publishing/publishing.properties")))

depends = ((String) properties.get("dependencies"))?.split("; *")

properties.forEach ((k, v) -> set(k, v))

version_valid = versionValidForPublishing(version)
Expand All @@ -32,17 +30,6 @@ tasks.register("printVersion") {
println(version)
}

tasks.register("printDependencies") {
for (dependency in (depends as List<String>)) {
var optionalDep = dependency.endsWith("?")
if (optionalDep) {
println("optional: " + dependency);
} else {
println("required: " + dependency);
}
}
}

static String makeName(String version, String minecraftVersion, String displayName) {
String projectVersion = "v" + version.split("-build")[0].replace("-", ".")
String rawPatch = System.getenv("PATCH_NUMBER")
Expand Down
1 change: 0 additions & 1 deletion gradle/publishing/publishing.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ modrinth_id = 4Q5DgkRU
curseforge_id = 833210
release_type = release
changelog_file = CHANGELOG.md
dependencies = ad-astra;fabric-api;forge-config-api-port

0 comments on commit b8ecd71

Please sign in to comment.