Skip to content

Commit

Permalink
Cf publish works
Browse files Browse the repository at this point in the history
  • Loading branch information
RealYusufIsmail committed Oct 25, 2023
1 parent a46345a commit 1f7330d
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 19 deletions.
4 changes: 4 additions & 0 deletions forge/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.

## [1.20.1-1.0.7.beta2] - 2023-10-24

### Added support for new forge. Changelog for both versions will now be split. Currently both versions are the same.

## [1.20.1-1.0.7.beta1] - 2023-10-23

### Added Thor hammer. This is a work in progress and will be updated in the future.
Expand Down
16 changes: 8 additions & 8 deletions forge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ plugins {
}

project.version = properties["modVersion"] as String
base.archivesName.set("armourandtoolsmod")
base.archivesName.set("armourandtoolsmod-forge")
val mcVersion = properties["mcVersion"] as String
var projectId = properties["projectId"] as String
val modId = properties["modId"] as String

println(
"""
Expand Down Expand Up @@ -39,7 +40,7 @@ configure<UserDevExtension> {
// Recommended logging level for the console
property("forge.logging.console.level", "debug")

mods { create(base.archivesName.get()) { source(sourceSets["main"]) } }
mods { create(modId) { source(sourceSets["main"]) } }
}

create("server") {
Expand All @@ -56,7 +57,7 @@ configure<UserDevExtension> {
// Recommended logging level for the console
property("forge.logging.console.level", "debug")

mods { create(base.archivesName.get()) { source(sourceSets["main"]) } }
mods { create(modId) { source(sourceSets["main"]) } }
}

create("gameTestServer") {
Expand Down Expand Up @@ -93,14 +94,14 @@ configure<UserDevExtension> {
// where to look for existing resources.
args(
"--mod",
base.archivesName.get(),
modId,
"--all",
"--output",
file("src/generated/resources/"),
"--existing",
file("src/main/resources/"))

mods { create(base.archivesName.get()) { source(sourceSets["main"]) } }
mods { create(modId) { source(sourceSets["main"]) } }

// 'runData' is renamed to 'runDataGenerator' to make it more clear what it does.
taskName = "runDataGenerator"
Expand Down Expand Up @@ -135,7 +136,6 @@ dependencies {
annotationProcessor("org.projectlombok:lombok:" + properties["lombokVersion"])
}


tasks.create("cfPublish", net.darkhax.curseforgegradle.TaskPublishCurseForge::class) {
group = "CurseForge"
dependsOn("build")
Expand All @@ -147,7 +147,7 @@ tasks.create("cfPublish", net.darkhax.curseforgegradle.TaskPublishCurseForge::cl
else ""
apiToken = token

val jar = file("build/libs/${base.archivesName.get() + "-forge"}-${project.version}.jar")
val jar = file("build/libs/${base.archivesName.get()}-${project.version}.jar")

// The main file to upload
val mainFile = upload(projectId, jar)
Expand All @@ -157,6 +157,6 @@ tasks.create("cfPublish", net.darkhax.curseforgegradle.TaskPublishCurseForge::cl
mainFile.addEmbedded("kotlin-for-forge")
mainFile.addEmbedded("realyusufismail-core")
mainFile.addJavaVersion("Java 17")
mainFile.addModLoader("forge", "NeoForge") // Remove after 1.20.1
mainFile.addModLoader("forge")
mainFile.addGameVersion(mcVersion)
}
3 changes: 2 additions & 1 deletion forge/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ kotlin.code.style=official
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

modVersion = 1.20.1-1.0.7.beta1
modVersion = 1.20.1-1.0.7.beta2
mcVersion = 1.20.1
projectId = 480779
modId = armourandtoolsmod

forgeVersion = 1.20.1-47.2.0
kotlinForForgeVersion = 4.4.0
Expand Down
4 changes: 4 additions & 0 deletions neoforge/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.

## [1.20.1-1.0.7.beta2] - 2023-10-24

### Added support for new forge. Changelog for both versions will now be split.

## [1.20.1-1.0.7.beta1] - 2023-10-23

### Added Thor hammer. This is a work in progress and will be updated in the future.
Expand Down
18 changes: 9 additions & 9 deletions neoforge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ plugins {
}

project.version = properties["modVersion"] as String
base.archivesName.set("armourandtoolsmod")
base.archivesName.set("armourandtoolsmod-neoforge")
val mcVersion = properties["mcVersion"] as String
var projectId = properties["projectId"] as String
val modId = properties["modId"] as String

println(
"""
Expand Down Expand Up @@ -39,7 +40,7 @@ configure<UserDevExtension> {
// Recommended logging level for the console
property("forge.logging.console.level", "debug")

mods { create(base.archivesName.get()) { source(sourceSets["main"]) } }
mods { create(modId) { source(sourceSets["main"]) } }
}

create("server") {
Expand All @@ -56,7 +57,7 @@ configure<UserDevExtension> {
// Recommended logging level for the console
property("forge.logging.console.level", "debug")

mods { create(base.archivesName.get()) { source(sourceSets["main"]) } }
mods { create(modId) { source(sourceSets["main"]) } }
}

create("gameTestServer") {
Expand All @@ -73,7 +74,7 @@ configure<UserDevExtension> {
// Recommended logging level for the console
property("forge.logging.console.level", "debug")

mods { create(base.archivesName.get()) { source(sourceSets["main"]) } }
mods { create(modId) { source(sourceSets["main"]) } }
}

create("data") {
Expand All @@ -93,14 +94,14 @@ configure<UserDevExtension> {
// where to look for existing resources.
args(
"--mod",
base.archivesName.get(),
modId,
"--all",
"--output",
file("src/generated/resources/"),
"--existing",
file("src/main/resources/"))

mods { create(base.archivesName.get()) { source(sourceSets["main"]) } }
mods { create(modId) { source(sourceSets["main"]) } }

// 'runData' is renamed to 'runDataGenerator' to make it more clear what it does.
taskName = "runDataGenerator"
Expand Down Expand Up @@ -135,7 +136,6 @@ dependencies {
annotationProcessor("org.projectlombok:lombok:" + properties["lombokVersion"])
}


tasks.create("cfPublish", net.darkhax.curseforgegradle.TaskPublishCurseForge::class) {
group = "CurseForge"
dependsOn("build")
Expand All @@ -147,7 +147,7 @@ tasks.create("cfPublish", net.darkhax.curseforgegradle.TaskPublishCurseForge::cl
else ""
apiToken = token

val jar = file("build/libs/${base.archivesName.get() + "-neoforge"}-${project.version}.jar")
val jar = file("build/libs/${base.archivesName.get()}-${project.version}.jar")

// The main file to upload
val mainFile = upload(projectId, jar)
Expand All @@ -157,6 +157,6 @@ tasks.create("cfPublish", net.darkhax.curseforgegradle.TaskPublishCurseForge::cl
mainFile.addEmbedded("kotlin-for-forge")
mainFile.addEmbedded("realyusufismail-core")
mainFile.addJavaVersion("Java 17")
mainFile.addModLoader("forge", "NeoForge") // Remove after 1.20.1
mainFile.addModLoader("NeoForge")
mainFile.addGameVersion(mcVersion)
}
3 changes: 2 additions & 1 deletion neoforge/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ kotlin.code.style=official
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

modVersion = 1.20.1-1.0.7.beta1
modVersion = 1.20.1-1.0.7.beta2
mcVersion = 1.20.1
projectId = 480779
modId = armourandtoolsmod

neoForgeVersion = 47.1.76
kotlinForForgeVersion = 4.4.0
Expand Down

0 comments on commit 1f7330d

Please sign in to comment.