diff --git a/.github/workflows/build-121.yml b/.github/workflows/build-121.yml index 19906c13..ed3b166f 100644 --- a/.github/workflows/build-121.yml +++ b/.github/workflows/build-121.yml @@ -36,14 +36,14 @@ jobs: mv build/libs/leaf-paperclip-1.21-R0.1-SNAPSHOT-mojmap.jar ./leaf-1.21-mojmap.jar mv build/libs/leaf-paperclip-1.21-R0.1-SNAPSHOT-reobf.jar ./leaf-1.21-reobf.jar -# - name: Publish API -# if: github.event_name != 'pull_request' -# run: | -# ./gradlew :leaf-api:publish -# ./gradlew publishDevBundlePublicationToLeafRepository -PpublishDevBundle=true -# env: -# ORG_GRADLE_PROJECT_leafUsername: ${{ secrets.REPO_USER }} -# ORG_GRADLE_PROJECT_leafPassword: ${{ secrets.REPO_PASSWORD }} + - name: Publish API + if: github.event_name != 'pull_request' + run: | + ./gradlew :leaf-api:publish + ./gradlew publishDevBundlePublicationToLeafRepository -PpublishDevBundle=true + env: + ORG_GRADLE_PROJECT_leafUsername: ${{ secrets.REPO_USER }} + ORG_GRADLE_PROJECT_leafPassword: ${{ secrets.REPO_PASSWORD }} - name: Upload Leaf uses: actions/upload-artifact@main diff --git a/README.md b/README.md index b0b4e7cb..ae794799 100644 --- a/README.md +++ b/README.md @@ -47,10 +47,16 @@ Building a Paperclip JAR for distribution: ./gradlew applyPatches && ./gradlew createMojmapPaperclipJar ``` -## 🧪 API (WIP) +## 🧪 API ### Maven ```xml + + leafmc + https://maven.nostal.ink/repository/maven-snapshots/ + +``` +```xml cn.dreeam.leaf leaf-api @@ -60,9 +66,19 @@ Building a Paperclip JAR for distribution: ``` ### Gradle ```kotlin +repositories { + maven { + url = uri("https://maven.nostal.ink/repository/maven-snapshots/") + } +} + dependencies { compileOnly("cn.dreeam.leaf:leaf-api:1.21-R0.1-SNAPSHOT") } + +java { + toolchain.languageVersion.set(JavaLanguageVersion.of(21)) +} ``` ## ⚖️ License diff --git a/build.gradle.kts b/build.gradle.kts index f1141fef..ba1fc414 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,13 +5,14 @@ plugins { } val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/" +val leafMavenPublicUrl = "https://maven.nostal.ink/repository/maven-snapshots/" repositories { mavenCentral() maven(paperMavenPublicUrl) { content { onlyForConfigurations(configurations.paperclip.name) } } - maven("https://maven.nostal.ink/repository/maven-snapshots/") // Quantumleaper + maven(leafMavenPublicUrl) // Quantumleaper } dependencies { @@ -86,6 +87,7 @@ tasks.generateDevelopmentBundle { listOf( "https://repo.maven.apache.org/maven2/", paperMavenPublicUrl, + leafMavenPublicUrl ) ) } @@ -105,10 +107,10 @@ allprojects { repositories { maven { name = "leaf" - url = uri("https://maven.pkg.github.com/Winds-Studio/Leaf") + url = uri(leafMavenPublicUrl) - credentials.username = System.getenv("REPO_PASSWORD") - credentials.password = System.getenv("REPO_USER") + credentials.username = System.getenv("REPO_USER") + credentials.password = System.getenv("REPO_PASSWORD") } publications {