Skip to content

Commit

Permalink
rework gradle script part 1
Browse files Browse the repository at this point in the history
  • Loading branch information
TexBlock committed Aug 5, 2024
1 parent f19356e commit 81e6fca
Show file tree
Hide file tree
Showing 23 changed files with 148 additions and 672 deletions.
16 changes: 3 additions & 13 deletions base-common/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
group = "band.kessoku.lib.base"
version = libs.versions.mod.get() + "+common." + libs.versions.minecraft.get()

base {
archivesName = rootProject.name + "-base"
}
apply from: rootProject.file("gradle/scripts/kessokulib-common.gradle")

architectury {
common(["fabric", "neoforge"])
}

dependencies {
modImplementation libs.fabric.loader
}
group = "band.kessoku.lib.base"
base.archivesName = rootProject.name + "-base"
48 changes: 2 additions & 46 deletions base-fabric/build.gradle
Original file line number Diff line number Diff line change
@@ -1,53 +1,9 @@
plugins {
id 'com.github.johnrengelman.shadow'
}
apply from: rootProject.file("gradle/scripts/kessokulib-fabric.gradle")

group = "band.kessoku.lib.base"
version = libs.versions.mod.get() + "+fabric." + libs.versions.minecraft.get()

base {
archivesName = rootProject.name + "-base"
}

architectury {
platformSetupLoomIde()
fabric()
}

configurations {
common {
canBeResolved = true
canBeConsumed = false
}
compileClasspath.extendsFrom common
runtimeClasspath.extendsFrom common
developmentFabric.extendsFrom common
shadowBundle {
canBeResolved = true
canBeConsumed = false
}
}
base.archivesName = rootProject.name + "-base"

dependencies {
modImplementation libs.fabric.loader
modImplementation libs.fabric.api
common(project(path: ':base-common', configuration: 'namedElements')) { transitive false }
shadowBundle project(path: ':base-common', configuration: 'transformProductionFabric')
}

processResources {
inputs.property 'version', project.version

filesMatching('fabric.mod.json') {
expand version: project.version
}
}

shadowJar {
configurations = [project.configurations.shadowBundle]
archiveClassifier = 'dev-shadow'
}

remapJar {
inputFile.set shadowJar.archiveFile
}
51 changes: 2 additions & 49 deletions base-neo/build.gradle
Original file line number Diff line number Diff line change
@@ -1,56 +1,9 @@
plugins {
id 'com.github.johnrengelman.shadow'
}

base {
archivesName = rootProject.name + "-base"
}
apply from: rootProject.file("gradle/scripts/kessokulib-neo.gradle")

group = "band.kessoku.lib.base"
version = libs.versions.mod.get() + "+neoforge." + libs.versions.minecraft.get()

architectury {
platformSetupLoomIde()
neoForge()
}

repositories {
maven { url "https://maven.neoforged.net/releases/" }
}

configurations {
common {
canBeResolved = true
canBeConsumed = false
}
compileClasspath.extendsFrom common
runtimeClasspath.extendsFrom common
developmentNeoForge.extendsFrom common
shadowBundle {
canBeResolved = true
canBeConsumed = false
}
}
base.archivesName = rootProject.name + "-base"

dependencies {
neoForge libs.neo
common(project(path: ':base-common', configuration: 'namedElements')) { transitive false }
shadowBundle project(path: ':base-common', configuration: 'transformProductionNeoForge')
}

processResources {
inputs.property 'version', project.version

filesMatching('META-INF/neoforge.mods.toml') {
expand version: project.version
}
}

shadowJar {
configurations = [project.configurations.shadowBundle]
archiveClassifier = 'dev-shadow'
}

remapJar {
inputFile.set shadowJar.archiveFile
}
13 changes: 3 additions & 10 deletions command-common/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
group = "band.kessoku.lib.command"
version = libs.versions.mod.get() + "+common." + libs.versions.minecraft.get()

base {
archivesName = rootProject.name + "-command_api"
}
apply from: rootProject.file("gradle/scripts/kessokulib-common.gradle")

architectury {
common(["fabric", "neoforge"])
}
group = "band.kessoku.lib.command"
base.archivesName = rootProject.name + "-command"

dependencies {
modImplementation libs.fabric.loader
implementation(project(":base-common"))
implementation(project(":event-base-common"))
}
49 changes: 2 additions & 47 deletions command-fabric/build.gradle
Original file line number Diff line number Diff line change
@@ -1,56 +1,11 @@
plugins {
id 'com.github.johnrengelman.shadow'
}
apply from: rootProject.file("gradle/scripts/kessokulib-fabric.gradle")

group = "band.kessoku.lib.command"
version = libs.versions.mod.get() + "+fabric." + libs.versions.minecraft.get()

base {
archivesName = rootProject.name + "-command_api"
}

architectury {
platformSetupLoomIde()
fabric()
}

configurations {
common {
canBeResolved = true
canBeConsumed = false
}
compileClasspath.extendsFrom common
runtimeClasspath.extendsFrom common
developmentFabric.extendsFrom common
shadowBundle {
canBeResolved = true
canBeConsumed = false
}
}
base.archivesName = rootProject.name + "-command"

dependencies {
modImplementation libs.fabric.loader
modImplementation libs.fabric.api

implementation(project(":event-base-common"))

common(project(path: ':command-common', configuration: 'namedElements')) { transitive false }
shadowBundle project(path: ':command-common', configuration: 'transformProductionFabric')
}

processResources {
inputs.property 'version', project.version

filesMatching('fabric.mod.json') {
expand version: project.version
}
}

shadowJar {
configurations = [project.configurations.shadowBundle]
archiveClassifier = 'dev-shadow'
}

remapJar {
input.set shadowJar.archiveFile
}
52 changes: 2 additions & 50 deletions command-neo/build.gradle
Original file line number Diff line number Diff line change
@@ -1,60 +1,12 @@
plugins {
id 'com.github.johnrengelman.shadow'
}
apply from: rootProject.file("gradle/scripts/kessokulib-neo.gradle")

group = "band.kessoku.lib.command"
version = libs.versions.mod.get() + "+neoforge." + libs.versions.minecraft.get()

base {
archivesName = rootProject.name + "-command_api"
}

architectury {
platformSetupLoomIde()
neoForge()
}

repositories {
maven { url "https://maven.neoforged.net/releases/" }
}

configurations {
common {
canBeResolved = true
canBeConsumed = false
}
compileClasspath.extendsFrom common
runtimeClasspath.extendsFrom common
developmentNeoForge.extendsFrom common
shadowBundle {
canBeResolved = true
canBeConsumed = false
}
}
base.archivesName = rootProject.name + "-command"

dependencies {
neoForge libs.neo

implementation(project(":event-base-common"))
implementation(project(":event-base-neo"))

common(project(path: ':command-common', configuration: 'namedElements')) { transitive false }
shadowBundle project(path: ':command-common', configuration: 'transformProductionNeoForge')
}

processResources {
inputs.property 'version', project.version

filesMatching('META-INF/neoforge.mods.toml') {
expand version: project.version
}
}

shadowJar {
configurations = [project.configurations.shadowBundle]
archiveClassifier = 'dev-shadow'
}

remapJar {
input.set shadowJar.archiveFile
}
13 changes: 3 additions & 10 deletions event-base-common/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
group = "band.kessoku.lib.event"
version = libs.versions.mod.get() + "+common." + libs.versions.minecraft.get()

base {
archivesName = rootProject.name + "-event-base"
}
apply from: rootProject.file("gradle/scripts/kessokulib-common.gradle")

architectury {
common(["fabric", "neoforge"])
}
group = "band.kessoku.lib.event"
base.archivesName = rootProject.name + "-event-base"

dependencies {
modImplementation libs.fabric.loader
implementation(project(":base-common"))
}
48 changes: 2 additions & 46 deletions event-base-fabric/build.gradle
Original file line number Diff line number Diff line change
@@ -1,53 +1,9 @@
plugins {
id 'com.github.johnrengelman.shadow'
}
apply from: rootProject.file("gradle/scripts/kessokulib-fabric.gradle")

group = "band.kessoku.lib.event"
version = libs.versions.mod.get() + "+fabric." + libs.versions.minecraft.get()

base {
archivesName = rootProject.name + "-event-base"
}

architectury {
platformSetupLoomIde()
fabric()
}

configurations {
common {
canBeResolved = true
canBeConsumed = false
}
compileClasspath.extendsFrom common
runtimeClasspath.extendsFrom common
developmentFabric.extendsFrom common
shadowBundle {
canBeResolved = true
canBeConsumed = false
}
}
base.archivesName = rootProject.name + "-event-base"

dependencies {
modImplementation libs.fabric.loader
modImplementation libs.fabric.api
common(project(path: ':event-base-common', configuration: 'namedElements')) { transitive false }
shadowBundle project(path: ':event-base-common', configuration: 'transformProductionFabric')
}

processResources {
inputs.property 'version', project.version

filesMatching('fabric.mod.json') {
expand version: project.version
}
}

shadowJar {
configurations = [project.configurations.shadowBundle]
archiveClassifier = 'dev-shadow'
}

remapJar {
inputFile.set shadowJar.archiveFile
}
Loading

0 comments on commit 81e6fca

Please sign in to comment.