Skip to content

Commit

Permalink
1.19.2/dev branch for maven uploads (#250)
Browse files Browse the repository at this point in the history
* 1.19.2 maven upload compatible branch.

* Added a mutable dependency set for power type data and bumped version

* fix incompatibility with fluidlogged (#63)

* Fix Calio dependency.

* Fix AEA version.

* Fixes to building.

* modImplementation -> modApi

---------

Co-authored-by: Apace <49096778+apace100@users.noreply.github.com>
Co-authored-by: Leximon <39879662+Leximon@users.noreply.github.com>
Co-authored-by: eggohito <66972816+eggohito@users.noreply.github.com>
  • Loading branch information
4 people authored Sep 17, 2024
1 parent 307b859 commit b5f5176
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 49 deletions.
111 changes: 69 additions & 42 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,37 +1,60 @@
plugins {
id 'fabric-loom' version '0.12-SNAPSHOT'
id 'fabric-loom' version '1.6-SNAPSHOT'
id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group

def ENV = System.getenv()

base {
archivesName = project.archives_base_name
}

repositories {

mavenLocal()
mavenCentral()

exclusiveContent {

forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}

filter {
includeGroup "maven.modrinth"
}

}
maven {
name = "Ladysnake Libs"
url = 'https://ladysnake.jfrog.io/artifactory/mods'
name = "Ladysnake Mods (Releases)"
url = "https://maven.ladysnake.org/releases"
}
maven {
name = "JitPack"
url = 'https://jitpack.io'
name = "Ladysnake Mods (Snapshots)"
url = "https://maven.ladysnake.org/snapshots"
}
maven {
url = 'https://maven.cafeteria.dev'
url = "https://maven.cafeteria.dev"
content {
includeGroup 'net.adriantodt.fabricmc'
includeGroup "net.adriantodt.fabricmc"
}
}
maven {
url "https://maven.shedaniel.me/"
url "https://maven.shedaniel.me"
}
maven {
url "https://maven.terraformersmc.com/"
url "https://maven.terraformersmc.com"
}
maven {
name = "JitPack"
url = 'https://jitpack.io'
}
mavenLocal()
}

loom {
Expand All @@ -49,29 +72,26 @@ dependencies {
// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

modImplementation "dev.onyxstudios.cardinal-components-api:cardinal-components-base:${project.cca_version}"
include "dev.onyxstudios.cardinal-components-api:cardinal-components-base:${project.cca_version}"
// Cardinal Components API
include(modApi("dev.onyxstudios.cardinal-components-api:cardinal-components-base:${project.cca_version}"))
include(modApi("dev.onyxstudios.cardinal-components-api:cardinal-components-entity:${project.cca_version}"))

modImplementation "dev.onyxstudios.cardinal-components-api:cardinal-components-entity:${project.cca_version}"
include "dev.onyxstudios.cardinal-components-api:cardinal-components-entity:${project.cca_version}"
// PlayerAbilityLib
include(modApi("io.github.ladysnake:PlayerAbilityLib:${pal_version}"))

modImplementation "io.github.ladysnake:PlayerAbilityLib:${pal_version}"
include "io.github.ladysnake:PlayerAbilityLib:${pal_version}"
// Calio
include(modApi("io.github.apace100:calio:${project.calio_version}"))

modImplementation "com.github.apace100:calio:${project.calio_version}"
include "com.github.apace100:calio:${project.calio_version}"

modApi("me.shedaniel.cloth:cloth-config-fabric:${project.clothconfig_version}") {
// Cloth Config
include(modApi("me.shedaniel.cloth:cloth-config-fabric:${project.clothconfig_version}")) {
exclude(group: "net.fabricmc.fabric-api")
}
include "me.shedaniel.cloth:cloth-config-fabric:${project.clothconfig_version}"

modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}"
// Mod Menu
modImplementation("com.terraformersmc:modmenu:${project.modmenu_version}")

modImplementation "com.github.DaFuqs:AdditionalEntityAttributes:${project.aea_version}"
include "com.github.DaFuqs:AdditionalEntityAttributes:${project.aea_version}"
// modImplementation "de.dafuqs:AdditionalEntityAttributes:${project.aea_version}"
// include "de.dafuqs:AdditionalEntityAttributes:${project.aea_version}"
// Additional Entity Attributes
include(modImplementation("maven.modrinth:AdditionalEntityAttributes:${project.aea_version}"))
}

processResources {
Expand All @@ -81,9 +101,10 @@ processResources {
expand "version": project.version
}

def environment = System.getenv("ENVIRONMENT");
if (environment != "production") {
from(rootProject.rootDir.absolutePath + "/testdata") { into 'data' }
if (ENV.ENVIRONMENT != "production") {
from(rootProject.rootDir.absolutePath + "/testdata") {
into "data"
}
}
}

Expand All @@ -108,25 +129,22 @@ java {
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
rename { "${it}_${project.base.archivesName.get()}"}
}
}

// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
// add all the jars that should be included when publishing to maven
artifact(remapJar) {
builtBy remapJar
}
artifact(sourcesJar) {
builtBy remapSourcesJar
}
create("mavenJava", MavenPublication) {
from components.java
}
}

Expand All @@ -137,5 +155,14 @@ publishing {
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
mavenLocal()
if (ENV.MAVEN_URL && ENV.MAVEN_USERNAME && ENV.MAVEN_PASSWORD) {
maven {
url = ENV.MAVEN_URL
credentials {
username = ENV.MAVEN_USERNAME
password = ENV.MAVEN_PASSWORD
}
}
}
}
}
13 changes: 7 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
org.gradle.parallel=true

# Fabric Properties
minecraft_version=1.19.2
yarn_mappings=1.19.2+build.9
loader_version=0.14.9
loader_version=0.15.11

# Mod Properties
mod_version = 2.6.1
maven_group = com.github.apace100
archives_base_name = Apoli-1.19.2
mod_version = 2.6.1+mc.1.19.2
maven_group = io.github.apace100
archives_base_name = Apoli

# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_version=0.60.0+1.19.2
cca_version=5.0.1
pal_version=1.6.0
calio_version=v1.7.0
calio_version=1.7.0+mc.1.19.x
clothconfig_version=8.0.75
modmenu_version=4.0.5
aea_version=95f13798d1
aea_version=1.2.0+1.19.2
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pluginManagement {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
mavenCentral()
gradlePluginPortal()
}
}

0 comments on commit b5f5176

Please sign in to comment.