Skip to content

Commit

Permalink
chore: Modify publishing and shadow-jar configs, and define global 'a…
Browse files Browse the repository at this point in the history
…nnotations' use for all subprojects
  • Loading branch information
aivruu committed Aug 29, 2024
1 parent 8c43e24 commit 00e5e96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
9 changes: 3 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ subprojects {
}

dependencies {
implementation("org.jetbrains:annotations:24.0.1")
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.8.1")
}

Expand All @@ -47,24 +48,20 @@ subprojects {
options.compilerArgs.add("-parameters")
}
shadowJar {
archiveFileName.set(rootProject.name)
archiveBaseName.set(project.name)
minimize()

// Package expected to use as final directory for dependencies used.
val relocationFinalPackage = "io.github.aivruu.repoviewer.libs"

relocate("org.jetbrains.annotations", "$relocationFinalPackage.org.jetbrains.annotations")
relocate("com.google.gson", "$relocationFinalPackage.com.google.gson")
relocate("com.google", "$relocationFinalPackage.com.google")
}
}

publishing {
publications {
create<MavenPublication>("maven") {
groupId = "io.github.aivruu.repoviewer"
artifactId = project.name
version = project.version.toString()

from(components["java"])
}
}
Expand Down
3 changes: 0 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ indra = "3.1.3"

# Version declaration for GSON library.
gson = "2.11.0"
# Version declaration for JetBrains Annotations.
annotations = "24.0.1"

[libraries]
gson = { group = "com.google.code.gson", name = "gson", version.ref = "gson" }
annotations = { group = "org.jetbrains", name = "annotations", version.ref = "annotations" }

[plugins]
shadow = { id = "io.github.goooler.shadow", version.ref = "shadow" }
Expand Down

0 comments on commit 00e5e96

Please sign in to comment.