Skip to content

Commit

Permalink
build: tweak gradle config
Browse files Browse the repository at this point in the history
Use api to expose to addons.
Switch to new refined architect and specify versions in properties.
  • Loading branch information
raoulvdberge committed Jun 9, 2024
1 parent cad4df8 commit 5a14786
Show file tree
Hide file tree
Showing 13 changed files with 73 additions and 64 deletions.
4 changes: 4 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
noIndiumVersion=1.1.0+1.20.4
trinketsVersion=3.8.0
cardinalComponentsVersion=5.4.0
curiosVersion=7.1.0+1.20.4
# Gradle
org.gradle.jvmargs=-Xmx1G
8 changes: 4 additions & 4 deletions refinedstorage2-grid-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ archivesBaseName = 'refinedstorage2-grid-api'

dependencies {
api libs.apiguardian
api project(':refinedstorage2-resource-api')
api project(':refinedstorage2-core-api')
api project(':refinedstorage2-storage-api')
api project(':refinedstorage2-query-parser')
implementation libs.slf4j.api
testImplementation libs.junit.api
testImplementation libs.junit.params
testRuntimeOnly libs.junit.engine
testRuntimeOnly libs.slf4j.impl
testImplementation libs.assertj
testImplementation libs.mockito
implementation project(':refinedstorage2-resource-api')
implementation project(':refinedstorage2-core-api')
implementation project(':refinedstorage2-storage-api')
implementation project(':refinedstorage2-query-parser')
}

test {
Expand Down
8 changes: 4 additions & 4 deletions refinedstorage2-network-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ archivesBaseName = 'refinedstorage2-network-api'

dependencies {
api libs.apiguardian
implementation project(':refinedstorage2-core-api')
implementation project(':refinedstorage2-resource-api')
implementation project(':refinedstorage2-storage-api')
implementation project(':refinedstorage2-grid-api')
api project(':refinedstorage2-core-api')
api project(':refinedstorage2-resource-api')
api project(':refinedstorage2-storage-api')
api project(':refinedstorage2-grid-api')
}

enableJavadoc()
Expand Down
16 changes: 10 additions & 6 deletions refinedstorage2-network-test/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
plugins {
id 'java-library'
}

archivesBaseName = 'refinedstorage2-network-test'

dependencies {
implementation project(':refinedstorage2-network-api')
implementation project(':refinedstorage2-network')
implementation project(':refinedstorage2-storage-api')
implementation project(':refinedstorage2-resource-api')
implementation project(':refinedstorage2-core-api')
implementation project(':refinedstorage2-grid-api')
api project(':refinedstorage2-network-api')
api project(':refinedstorage2-network')
api project(':refinedstorage2-storage-api')
api project(':refinedstorage2-resource-api')
api project(':refinedstorage2-core-api')
api project(':refinedstorage2-grid-api')
implementation libs.junit.api
testRuntimeOnly libs.junit.engine
testImplementation libs.assertj
Expand Down
14 changes: 9 additions & 5 deletions refinedstorage2-network/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
plugins {
id 'java-library'
}

archivesBaseName = 'refinedstorage2-network'

dependencies {
api project(':refinedstorage2-core-api')
api project(':refinedstorage2-network-api')
api project(':refinedstorage2-resource-api')
api project(':refinedstorage2-storage-api')
api project(':refinedstorage2-grid-api')
implementation libs.slf4j.api
testRuntimeOnly libs.slf4j.impl
testImplementation libs.junit.api
Expand All @@ -9,11 +18,6 @@ dependencies {
testImplementation libs.assertj
testImplementation libs.mockito
testImplementation project(':refinedstorage2-network-test')
implementation project(':refinedstorage2-core-api')
implementation project(':refinedstorage2-network-api')
implementation project(':refinedstorage2-resource-api')
implementation project(':refinedstorage2-storage-api')
implementation project(':refinedstorage2-grid-api')
}

test {
Expand Down
10 changes: 5 additions & 5 deletions refinedstorage2-platform-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ archivesBaseName = 'refinedstorage2-platform-api'

dependencies {
api libs.apiguardian
implementation project(':refinedstorage2-core-api')
implementation project(':refinedstorage2-storage-api')
implementation project(':refinedstorage2-resource-api')
implementation project(':refinedstorage2-network-api')
implementation project(':refinedstorage2-grid-api')
api project(':refinedstorage2-core-api')
api project(':refinedstorage2-storage-api')
api project(':refinedstorage2-resource-api')
api project(':refinedstorage2-network-api')
api project(':refinedstorage2-grid-api')
testImplementation libs.junit.api
testImplementation libs.junit.params
testRuntimeOnly libs.junit.engine
Expand Down
20 changes: 12 additions & 8 deletions refinedstorage2-platform-common/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
plugins {
id 'java-library'
}

archivesBaseName = 'refinedstorage2-platform-common'

commonProject()

dependencies {
implementation project(':refinedstorage2-platform-api')
implementation project(':refinedstorage2-core-api')
implementation project(':refinedstorage2-resource-api')
implementation project(':refinedstorage2-storage-api')
implementation project(':refinedstorage2-network-api')
implementation project(':refinedstorage2-network')
implementation project(':refinedstorage2-query-parser')
implementation project(':refinedstorage2-grid-api')
api project(':refinedstorage2-platform-api')
api project(':refinedstorage2-core-api')
api project(':refinedstorage2-resource-api')
api project(':refinedstorage2-storage-api')
api project(':refinedstorage2-network-api')
api project(':refinedstorage2-network')
api project(':refinedstorage2-query-parser')
api project(':refinedstorage2-grid-api')
testImplementation libs.junit.api
testImplementation libs.junit.params
testRuntimeOnly libs.junit.engine
Expand Down
26 changes: 10 additions & 16 deletions refinedstorage2-platform-fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ repositories {
name = 'Cloth Config'
url 'https://maven.shedaniel.me/'
}
maven {
name = 'wthit'
url "https://maven.bai.lol"
}
maven {
name = 'NoIndium'
url = 'https://maven.cafeteria.dev/releases/'
Expand All @@ -26,27 +22,25 @@ repositories {
fabricProject("refinedstorage2", project(":refinedstorage2-platform-common"), apis, compileApis)

dependencies {
modImplementation(fabric.cloth.config) {
modApi(libs.cloth.config) {
exclude(group: 'net.fabricmc.fabric-api')
}
include fabric.cloth.config
include libs.cloth.config

modImplementation(fabric.teamreborn.energy) {
modApi(libs.teamreborn.energy) {
exclude(group: 'net.fabricmc.fabric-api')
}
include fabric.teamreborn.energy

modImplementation fabric.noIndium
include fabric.noIndium
include libs.teamreborn.energy

modImplementation fabric.modmenu
modApi "me.luligabi:NoIndium:${noIndiumVersion}"
include "me.luligabi:NoIndium:${noIndiumVersion}"

modRuntimeOnly fabric.wthit
modApi libs.modmenu

// https://www.curseforge.com/minecraft/mc-mods/trinkets/files
modImplementation "dev.emi:trinkets:3.8.0"
modImplementation "dev.onyxstudios.cardinal-components-api:cardinal-components-base:5.4.0"
modImplementation "dev.onyxstudios.cardinal-components-api:cardinal-components-entity:5.4.0"
modApi "dev.emi:trinkets:${trinketsVersion}"
modApi "dev.onyxstudios.cardinal-components-api:cardinal-components-base:${cardinalComponentsVersion}"
modApi "dev.onyxstudios.cardinal-components-api:cardinal-components-entity:${cardinalComponentsVersion}"
}

enablePublishing()
8 changes: 6 additions & 2 deletions refinedstorage2-platform-forge/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
id 'java-library'
}

repositories {
maven {
name = 'Curios'
Expand All @@ -10,8 +14,8 @@ forgeProject("refinedstorage2", project(":refinedstorage2-platform-common"), api
archivesBaseName = 'refinedstorage2-platform-forge'

dependencies {
runtimeOnly "top.theillusivec4.curios:curios-neoforge:7.1.0+1.20.4"
compileOnly "top.theillusivec4.curios:curios-neoforge:7.1.0+1.20.4:api"
runtimeOnly "top.theillusivec4.curios:curios-neoforge:${curiosVersion}"
compileOnlyApi "top.theillusivec4.curios:curios-neoforge:${curiosVersion}:api"
}

enablePublishing()
6 changes: 5 additions & 1 deletion refinedstorage2-query-parser/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
plugins {
id 'java-library'
}

archivesBaseName = 'refinedstorage2-query-parser'

dependencies {
api project(':refinedstorage2-core-api')
testImplementation libs.junit.api
testImplementation libs.junit.params
testRuntimeOnly libs.junit.engine
testImplementation libs.assertj
implementation project(':refinedstorage2-core-api')
}

test {
Expand Down
2 changes: 1 addition & 1 deletion refinedstorage2-resource-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ archivesBaseName = 'refinedstorage2-resource-api'

dependencies {
api libs.apiguardian
api project(":refinedstorage2-core-api")
testImplementation libs.junit.api
testRuntimeOnly libs.junit.engine
testImplementation libs.assertj
implementation project(":refinedstorage2-core-api")
}

test {
Expand Down
4 changes: 2 additions & 2 deletions refinedstorage2-storage-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ archivesBaseName = 'refinedstorage2-storage-api'

dependencies {
api libs.apiguardian
api project(':refinedstorage2-resource-api')
api project(':refinedstorage2-core-api')
implementation libs.slf4j.api
testImplementation libs.junit.api
testImplementation libs.junit.params
testRuntimeOnly libs.junit.engine
testRuntimeOnly libs.slf4j.impl
testImplementation libs.assertj
testImplementation libs.mockito
implementation project(':refinedstorage2-resource-api')
implementation project(':refinedstorage2-core-api')
}

test {
Expand Down
11 changes: 1 addition & 10 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
gradle.ext.refinedArchitectVersion = "0.12.1"
gradle.ext.refinedArchitectVersion = "0.13.2"

dependencyResolutionManagement {
repositories {
Expand All @@ -11,15 +11,6 @@ dependencyResolutionManagement {
}
}
versionCatalogs {
create("common") {
from("com.refinedmods.refinedarchitect:refinedarchitect-catalog-platform-common:${gradle.ext.refinedArchitectVersion}")
}
create("fabric") {
from("com.refinedmods.refinedarchitect:refinedarchitect-catalog-platform-fabric:${gradle.ext.refinedArchitectVersion}")
}
create("forge") {
from("com.refinedmods.refinedarchitect:refinedarchitect-catalog-platform-forge:${gradle.ext.refinedArchitectVersion}")
}
create("libs") {
from("com.refinedmods.refinedarchitect:refinedarchitect-catalog:${gradle.ext.refinedArchitectVersion}")
}
Expand Down

0 comments on commit 5a14786

Please sign in to comment.