-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attempt at fixing published artifact
- Loading branch information
1 parent
9788138
commit b7806d5
Showing
8 changed files
with
93 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
repositories { | ||
gradlePluginPortal() | ||
mavenCentral() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rootProject.name = "build-logic" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import org.gradle.kotlin.dsl.`java-library` | ||
|
||
plugins { | ||
`java-library` | ||
} |
14 changes: 14 additions & 0 deletions
14
build-logic/src/main/kotlin/pack.publish-conventions.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
plugins { | ||
`maven-publish` | ||
} | ||
|
||
publishing { | ||
repositories { | ||
val repoName = if (version.toString().endsWith("SNAPSHOT")) "maven-snapshots" else "maven-releases" | ||
maven("https://repo.opencollab.dev/${repoName}/") { | ||
credentials.username = System.getenv("OPENCOLLAB_USERNAME") | ||
credentials.password = System.getenv("OPENCOLLAB_PASSWORD") | ||
name = "opencollab" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
|
||
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" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,40 @@ | ||
plugins { | ||
application | ||
id("io.freefair.lombok") version "8.6" | ||
} | ||
|
||
sourceSets { | ||
main { | ||
resources { | ||
srcDir("src/main/java/resources") | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
api(project(":pack-schema-api")) | ||
implementation("com.google.code.gson:gson:2.10.1") | ||
implementation("commons-io:commons-io:2.11.0") | ||
compileOnly("com.google.code.gson:gson:2.10.1") | ||
compileOnly("commons-io:commons-io:2.11.0") | ||
implementation("com.twelvemonkeys.imageio:imageio-tga:3.9.4") | ||
implementation("com.nukkitx.fastutil:fastutil-int-object-maps:8.5.3") | ||
implementation("net.kyori:adventure-api:4.14.0") | ||
implementation("net.kyori:adventure-text-serializer-gson:4.14.0") | ||
implementation("net.kyori:adventure-text-serializer-legacy:4.14.0") | ||
implementation("team.unnamed:creative-api:1.7.0") | ||
implementation("team.unnamed:creative-serializer-minecraft:1.7.0") | ||
api("net.kyori:adventure-api:4.14.0") | ||
api("net.kyori:adventure-text-serializer-gson:4.14.0") | ||
api("net.kyori:adventure-text-serializer-legacy:4.14.0") | ||
api("team.unnamed:creative-api:1.7.0") | ||
api("team.unnamed:creative-serializer-minecraft:1.7.0") | ||
|
||
compileOnly("com.google.auto.service:auto-service:1.0.1") | ||
annotationProcessor("com.google.auto.service:auto-service:1.0.1") | ||
} | ||
|
||
tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> { | ||
from("src/main/java/resources") { | ||
include("*") | ||
} | ||
java { | ||
withSourcesJar() | ||
} | ||
|
||
archiveFileName.set("PackConverter-lib.jar") | ||
archiveClassifier.set("") | ||
publishing { | ||
publications { | ||
register("publish", MavenPublication::class) { | ||
from(project.components["java"]) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters