Skip to content

Commit

Permalink
new: Add FlashyReese's maven repository
Browse files Browse the repository at this point in the history
  • Loading branch information
FlashyReese committed Apr 29, 2024
1 parent f0a3103 commit d569f0f
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/build-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ jobs:
restore-keys: |
${{ runner.os }}-build-commit-
- name: Build artifacts
run: ./gradlew build
run: ./gradlew build publishMavenJavaPublicationToFlashyReeseSnapshotsRepository
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
Expand Down
28 changes: 28 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
plugins {
id("java")
id("fabric-loom") version("1.6.6") apply(false)
id("maven-publish")
}

val MINECRAFT_VERSION by extra { "1.20.4" }
Expand Down Expand Up @@ -74,3 +75,30 @@ subprojects {
enabled = false
}
}

publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
}
}

repositories {
maven {
name = "FlashyReeseReleases"
setUrl(uri("https://maven.flashyreese.me/releases"))
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
maven {
name = "FlashyReeseSnapshots"
setUrl(uri("https://maven.flashyreese.me/snapshots"))
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
}
4 changes: 4 additions & 0 deletions common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ tasks.withType<AbstractRemapJarTask>().forEach {
it.targetNamespace = "named"
}

java {
withSourcesJar()
}

sourceSets {
val main = getByName("main")
val api = create("api")
Expand Down

0 comments on commit d569f0f

Please sign in to comment.