Skip to content

Commit

Permalink
➕ Added missing lib to inclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
XyperCode committed Dec 15, 2024
1 parent 0b520a2 commit 21d68f7
Show file tree
Hide file tree
Showing 7 changed files with 124 additions and 34 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/gradle-publish-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle

name: Gradle Package

on:
push:
branches:
- 1.*

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Setup Gradle
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
with:
cache-disabled: true

- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Build with Gradle
run: ./gradlew build -Pci=true -Pbranch=${{ steps.extract_branch.outputs.branch }} -Psnapshot=true

# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
# the publishing section of your build.gradle
- name: Publish to GitHub Packages
run: ./gradlew publish -Pci=true -Pbranch=${{ steps.extract_branch.outputs.branch }} -Psnapshot=true
env:
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
44 changes: 44 additions & 0 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle

name: Gradle Package

on:
release:
types: [created]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Setup Gradle
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0

- name: Build with Gradle
run: ./gradlew build -Pci=true

# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
# the publishing section of your build.gradle
- name: Publish to GitHub Packages
run: ./gradlew publish -Pci=true
env:
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,7 @@ run/

# Ignore datagen cache.
/common/src/main/generated/resources/.cache/
/quilt/runs/
/fabric/runs/
/fabric/run/
/forge/runs/
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ architectury {
minecraft = minecraft_version
}

if (project.hasProperty('ci') && project.ci.toBoolean() && project.hasProperty('snapshot') && project.snapshot.toBoolean()) {
mod_version += '-SNAPSHOT'
}

version mod_version

Object getIngameVersion() {
Expand Down
14 changes: 7 additions & 7 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ sourceSets {
}
}


publishing {
publications {
mavenCommon(MavenPublication) {
artifactId = rootProject.archives_base_name
register('mavenCommon', MavenPublication) {
artifactId base.archivesName.get()
from components.java
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
maven {
url System.getenv('local_maven_url')
}
}
rootProject.setupRepositories(repositories)
}
}
26 changes: 8 additions & 18 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,12 @@ configurations {
dependencies {
modImplementation "net.fabricmc:fabric-loader:$fabric_loader_version"
modApi "net.fabricmc.fabric-api:fabric-api:$fabric_api_version"
// Remove the next line if you don't want to depend on the API
modApi "dev.architectury:architectury-fabric:$architectury_version"

modApi "fuzs.forgeconfigapiport:forgeconfigapiport-fabric:8.0.0"
modImplementation 'com.electronwill.night-config:core:3.6.5'
modImplementation 'com.electronwill.night-config:toml:3.6.5'

// include(implementation("org.jetbrains.kotlin:kotlin-reflect:1.7.10"))
// include(implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10"))
// include(implementation("com.ultreon:ultranlang:0.1.0+6"))

//shadowCommon "org.jetbrains.kotlin:kotlin-reflect:1.7.10"
//shadowCommon "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10"
// shadowCommon "com.ultreon:ultranlang:0.1.0+6"

modApi include("net.fabricmc:fabric-language-kotlin:1.8.2+kotlin.1.7.10")

common(project(path: ":common", configuration: "namedElements")) { transitive false }
Expand All @@ -69,10 +60,11 @@ dependencies {
exclude module: "fabric-api"
}

include "org.apache.commons:commons-lang3:3.11"
// modApi "curse.maven:emojiful-284324:4672307"
}

configurations.all {
configurations.configureEach {
resolutionStrategy {
force("net.fabricmc:fabric-loader:$fabric_loader_version")
}
Expand Down Expand Up @@ -120,19 +112,17 @@ components.java {
}
}


publishing {
publications {
mavenFabric(MavenPublication) {
System.out.println(artifactId)
artifactId = rootProject.archivesBaseName + "-fabric"
//artifactId = rootProject.archives_base_name + "-fabric" + //project.name
register('mavenFabric', MavenPublication) {
artifactId base.archivesName.get()
from components.java
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
maven {
url System.getenv('local_maven_url')
}
}
rootProject.setupRepositories(repositories)
}
16 changes: 7 additions & 9 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ dependencies {
common(project(path: ":common", configuration: "namedElements")) { transitive false }
shadowCommon(project(path: ":common", configuration: "transformProductionForge")) { transitive = false }

include "org.apache.commons:commons-lang3:3.11"
// forgeRuntimeLibrary "com.ultreon:ultranlang:0.1.0+6"
// implementation include("com.ultreon:ultranlang:0.1.0+6")
}
Expand Down Expand Up @@ -93,20 +94,17 @@ components.java {
}
}


publishing {
publications {
mavenForge(MavenPublication) {
System.out.println(artifactId)
artifactId = rootProject.archivesBaseName + "-forge"
//artifactId = rootProject.archivesBaseName + "-forge" + //project.name
register('mavenForge', MavenPublication) {
artifactId base.archivesName.get()
from components.java
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
maven {
url System.getenv('local_maven_url')
}
}
rootProject.setupRepositories(repositories)
}

0 comments on commit 21d68f7

Please sign in to comment.