Skip to content

Commit

Permalink
build: Some more gradle fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed May 19, 2024
1 parent 55eb88c commit 475b490
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ jobs:
loader: [ common, fabric, forge, neoforge ]
site: [ curseforge, modrinth, publish ]
exclude:
- loader: shared
- loader: common
site: curseforge
- loader: shared
- loader: common
site: modrinth
steps:
- name: Checkout repository
Expand Down
8 changes: 8 additions & 0 deletions buildSrc/src/main/groovy/multiloader-loader.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ configurations {
commonResources {
canBeResolved = true
}
commonGeneratedResources {
canBeResolved = true
}
}

dependencies {
Expand All @@ -19,6 +22,7 @@ dependencies {
}
commonJava project(path: ':common', configuration: 'commonJava')
commonResources project(path: ':common', configuration: 'commonResources')
commonGeneratedResources project(path: ':common', configuration: 'commonGeneratedResources')
}

tasks.named('compileJava', JavaCompile) {
Expand All @@ -28,7 +32,9 @@ tasks.named('compileJava', JavaCompile) {

processResources {
dependsOn(configurations.commonResources)
dependsOn(configurations.commonGeneratedResources)
from(configurations.commonResources)
from(configurations.commonGeneratedResources)
}

tasks.named('javadoc', Javadoc).configure {
Expand All @@ -41,4 +47,6 @@ tasks.named("sourcesJar", Jar) {
from(configurations.commonJava)
dependsOn(configurations.commonResources)
from(configurations.commonResources)
dependsOn(configurations.commonGeneratedResources)
from(configurations.commonGeneratedResources)
}
2 changes: 2 additions & 0 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ minecraft {
}
}

sourceSets.main.resources.srcDir('src/generated/resources')

dependencies {
compileOnly "org.spongepowered:mixin:$mixin_version"
}
Expand Down
2 changes: 1 addition & 1 deletion fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ loom {
runDir("build/datagen")

vmArg "-Dfabric-api.datagen"
vmArg "-Dfabric-api.datagen.output-dir=${project(":common").file("src/main/generated")}"
vmArg "-Dfabric-api.datagen.output-dir=${project(":common").file("src/generated/resources")}"
vmArg "-Dfabric-api.datagen.modid=${mod_id}"
}
}
Expand Down

0 comments on commit 475b490

Please sign in to comment.