mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-19 15:09:25 +00:00
Publish API
This commit is contained in:
16
.github/workflows/build-121.yml
vendored
16
.github/workflows/build-121.yml
vendored
@@ -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
|
||||
|
||||
18
README.md
18
README.md
@@ -47,10 +47,16 @@ Building a Paperclip JAR for distribution:
|
||||
./gradlew applyPatches && ./gradlew createMojmapPaperclipJar
|
||||
```
|
||||
|
||||
## 🧪 API (WIP)
|
||||
## 🧪 API
|
||||
|
||||
### Maven
|
||||
```xml
|
||||
<repository>
|
||||
<id>leafmc</id>
|
||||
<url>https://maven.nostal.ink/repository/maven-snapshots/</url>
|
||||
</repository>
|
||||
```
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>cn.dreeam.leaf</groupId>
|
||||
<artifactId>leaf-api</artifactId>
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user