1
0
mirror of https://github.com/GeyserMC/PackConverter.git synced 2025-12-19 14:59:21 +00:00

Proper publishing setup (#17)

* Attempt at fixing published artifact

* wohoo it works

* attempt at excluding bootstrap's shadow jar from publishing

* Update gradle, fix publishing (aka, dont publish shadowed bootstrap build to maven)

* Don't apply shadow plugin for the converter

* why are we publishing the lib as an artifact...?

* make these implementation

* Shade bedrock-pack-schema into pack-schema-api
This commit is contained in:
chris
2024-03-13 15:34:58 +01:00
committed by GitHub
parent 0a1114b22f
commit 7a2caf6f5d
11 changed files with 108 additions and 79 deletions

View File

@@ -1,57 +1,13 @@
plugins {
id("java")
id("java-library")
id("maven-publish")
id("com.github.johnrengelman.shadow") version "7.1.0"
id("io.freefair.lombok") version "6.3.0" apply false
id("pack.base-conventions")
}
allprojects {
apply(plugin = "java")
apply(plugin = "java-library")
apply(plugin = "maven-publish")
apply(plugin = "com.github.johnrengelman.shadow")
apply(plugin = "io.freefair.lombok")
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
// Geyser, Floodgate, Cumulus etc.
maven("https://repo.opencollab.dev/main")
maven("https://repo.opencollab.dev/maven-snapshots")
// Java pack library
maven("https://repo.unnamed.team/repository/unnamed-public/")
}
subprojects{
plugins.apply("pack.base-conventions")
plugins.apply("pack.publish-conventions")
group = "org.geysermc.pack"
version = "3.0-SNAPSHOT"
version = "3.1-SNAPSHOT"
java.sourceCompatibility = JavaVersion.VERSION_17
java.targetCompatibility = JavaVersion.VERSION_17
tasks.jar {
archiveClassifier.set("unshaded")
}
tasks.named("build") {
dependsOn(tasks.shadowJar)
}
publishing {
publications.create<MavenPublication>("library") {
artifact(tasks.shadowJar)
}
val repoName = if (version.toString().endsWith("SNAPSHOT")) "maven-snapshots" else "maven-releases"
repositories {
maven("https://repo.opencollab.dev/${repoName}/") {
credentials.username = System.getenv("OPENCOLLAB_USERNAME")
credentials.password = System.getenv("OPENCOLLAB_PASSWORD")
name = "opencollab"
}
}
}
}