Skip to content

Commit

Permalink
fix(v2): fix publishing + tweak gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
ANutley committed Aug 1, 2023
1 parent 4f2e9a8 commit 30580bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.gradle
/build/
config.yml
*build/
/config/
/jars/

# Ignore Gradle GUI config
gradle-app.setting
Expand Down
8 changes: 5 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ plugins {

}

allprojects {
project.extra.set("artifactId", (if (rootProject == project) project.name else "${rootProject.name}-${project.name}").toLowerCase())
}

subprojects {
apply(plugin = "java")
apply(plugin = "maven-publish")
Expand All @@ -22,9 +26,6 @@ subprojects {

tasks {
withType<Jar> {
archiveVersion.set("${project.properties["version"]}")

archiveClassifier.set("unshaded")
archiveFileName.set("DisLink-${archiveBaseName.get().capitalized()}-${archiveVersion.get()}-unshaded.jar")
}

Expand Down Expand Up @@ -67,6 +68,7 @@ subprojects {
publications {
create<MavenPublication>("maven") {
from(components["java"])
artifactId = project.extra.get("artifactId").toString()
}
}

Expand Down

0 comments on commit 30580bc

Please sign in to comment.