mirror of
https://github.com/architectury/architectury-api.git
synced 2026-03-28 03:56:59 -05:00
Switch to gradle components
This commit is contained in:
@@ -7,8 +7,17 @@ loom {
|
||||
accessWidenerPath = file("src/main/resources/architectury.accessWidener")
|
||||
}
|
||||
|
||||
architectury {
|
||||
platformSetupLoomIde()
|
||||
fabric()
|
||||
}
|
||||
|
||||
configurations {
|
||||
shadowCommon
|
||||
common
|
||||
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
|
||||
compileClasspath.extendsFrom common
|
||||
runtimeClasspath.extendsFrom common
|
||||
developmentFabric.extendsFrom common
|
||||
dev
|
||||
}
|
||||
|
||||
@@ -16,11 +25,6 @@ artifacts {
|
||||
dev(jar)
|
||||
}
|
||||
|
||||
architectury {
|
||||
platformSetupLoomIde()
|
||||
fabric()
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven { url "https://maven.terraformersmc.com/releases/" }
|
||||
}
|
||||
@@ -30,15 +34,8 @@ dependencies {
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}"
|
||||
modCompileOnly("com.terraformersmc:modmenu:${rootProject.mod_menu_version}") { transitive false }
|
||||
|
||||
implementation(project(path: ":common", configuration: "dev")) {
|
||||
transitive = false
|
||||
}
|
||||
developmentFabric(project(path: ":common", configuration: "dev")) {
|
||||
transitive = false
|
||||
}
|
||||
shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) {
|
||||
transitive = false
|
||||
}
|
||||
common(project(path: ":common", configuration: "dev")) { transitive false }
|
||||
shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) { transitive false }
|
||||
}
|
||||
|
||||
processResources {
|
||||
@@ -50,13 +47,17 @@ processResources {
|
||||
|
||||
shadowJar {
|
||||
configurations = [project.configurations.shadowCommon]
|
||||
classifier "shadow"
|
||||
classifier "dev-shadow"
|
||||
}
|
||||
|
||||
remapJar {
|
||||
dependsOn(shadowJar)
|
||||
input.set(shadowJar.archiveFile)
|
||||
archiveClassifier = "fabric"
|
||||
input.set shadowJar.archiveFile
|
||||
dependsOn shadowJar
|
||||
classifier null
|
||||
}
|
||||
|
||||
jar {
|
||||
classifier "dev"
|
||||
}
|
||||
|
||||
sourcesJar {
|
||||
@@ -71,17 +72,17 @@ sourcesJar {
|
||||
}
|
||||
}
|
||||
|
||||
components.java {
|
||||
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
|
||||
skip()
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenFabric(MavenPublication) {
|
||||
artifactId = rootProject.archivesBaseName + "-fabric"
|
||||
artifact(remapJar) { classifier null }
|
||||
afterEvaluate {
|
||||
artifact(remapSourcesJar.output) {
|
||||
builtBy remapSourcesJar
|
||||
classifier "sources"
|
||||
}
|
||||
}
|
||||
from components.java
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,8 +10,17 @@ loom {
|
||||
}
|
||||
}
|
||||
|
||||
architectury {
|
||||
platformSetupLoomIde()
|
||||
forge()
|
||||
}
|
||||
|
||||
configurations {
|
||||
shadowCommon
|
||||
common
|
||||
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
|
||||
compileClasspath.extendsFrom common
|
||||
runtimeClasspath.extendsFrom common
|
||||
developmentForge.extendsFrom common
|
||||
dev
|
||||
}
|
||||
|
||||
@@ -19,23 +28,11 @@ artifacts {
|
||||
dev(jar)
|
||||
}
|
||||
|
||||
architectury {
|
||||
platformSetupLoomIde()
|
||||
forge()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
forge "net.minecraftforge:forge:${rootProject.architectury.minecraft}-${rootProject.forge_version}"
|
||||
|
||||
implementation(project(path: ":common", configuration: "dev")) {
|
||||
transitive = false
|
||||
}
|
||||
developmentForge(project(path: ":common", configuration: "dev")) {
|
||||
transitive = false
|
||||
}
|
||||
shadowCommon(project(path: ":common", configuration: "transformProductionForge")) {
|
||||
transitive = false
|
||||
}
|
||||
common(project(path: ":common", configuration: "dev")) { transitive false }
|
||||
shadowCommon(project(path: ":common", configuration: "transformProductionForge")) { transitive false }
|
||||
}
|
||||
|
||||
processResources {
|
||||
@@ -50,13 +47,17 @@ shadowJar {
|
||||
exclude "architectury-common.accessWidener"
|
||||
|
||||
configurations = [project.configurations.shadowCommon]
|
||||
classifier "shadow"
|
||||
classifier "dev-shadow"
|
||||
}
|
||||
|
||||
remapJar {
|
||||
dependsOn(shadowJar)
|
||||
input.set(shadowJar.archivePath)
|
||||
archiveClassifier = "forge"
|
||||
input.set shadowJar.archiveFile
|
||||
dependsOn shadowJar
|
||||
classifier null
|
||||
}
|
||||
|
||||
jar {
|
||||
classifier "dev"
|
||||
}
|
||||
|
||||
sourcesJar {
|
||||
@@ -71,17 +72,17 @@ sourcesJar {
|
||||
}
|
||||
}
|
||||
|
||||
components.java {
|
||||
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
|
||||
skip()
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenForge(MavenPublication) {
|
||||
artifactId = rootProject.archivesBaseName + "-forge"
|
||||
artifact(remapJar) { classifier null }
|
||||
afterEvaluate {
|
||||
artifact(remapSourcesJar.output) {
|
||||
builtBy remapSourcesJar
|
||||
classifier "sources"
|
||||
}
|
||||
}
|
||||
from components.java
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,21 +12,18 @@ architectury {
|
||||
fabric()
|
||||
}
|
||||
|
||||
configurations {
|
||||
common
|
||||
compileClasspath.extendsFrom common
|
||||
runtimeClasspath.extendsFrom common
|
||||
developmentFabric.extendsFrom common
|
||||
}
|
||||
|
||||
dependencies {
|
||||
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}"
|
||||
|
||||
implementation project(path: ":fabric", configuration: "dev")
|
||||
implementation(project(path: ":common", configuration: "dev")) {
|
||||
transitive = false
|
||||
}
|
||||
developmentFabric(project(path: ":common", configuration: "dev")) {
|
||||
transitive = false
|
||||
}
|
||||
implementation(project(path: ":testmod-common", configuration: "dev")) {
|
||||
transitive = false
|
||||
}
|
||||
developmentFabric(project(path: ":testmod-common", configuration: "dev")) {
|
||||
transitive = false
|
||||
}
|
||||
common(project(path: ":common", configuration: "dev")) { transitive = false }
|
||||
common(project(path: ":testmod-common", configuration: "dev")) { transitive false }
|
||||
}
|
||||
|
||||
@@ -20,20 +20,17 @@ architectury {
|
||||
forge()
|
||||
}
|
||||
|
||||
configurations {
|
||||
common
|
||||
compileClasspath.extendsFrom common
|
||||
runtimeClasspath.extendsFrom common
|
||||
developmentForge.extendsFrom common
|
||||
}
|
||||
|
||||
dependencies {
|
||||
forge "net.minecraftforge:forge:${gradle.rootProject.architectury.minecraft}-${rootProject.forge_version}"
|
||||
|
||||
implementation project(path: ":forge", configuration: "dev")
|
||||
implementation(project(path: ":common", configuration: "dev")) {
|
||||
transitive = false
|
||||
}
|
||||
developmentForge(project(path: ":common", configuration: "dev")) {
|
||||
transitive = false
|
||||
}
|
||||
implementation(project(path: ":testmod-common", configuration: "dev")) {
|
||||
transitive = false
|
||||
}
|
||||
developmentForge(project(path: ":testmod-common", configuration: "dev")) {
|
||||
transitive = false
|
||||
}
|
||||
common(project(path: ":common", configuration: "dev")) { transitive false }
|
||||
common(project(path: ":testmod-common", configuration: "dev")) { transitive false }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user