Skip to content

Commit

Permalink
collectJars task
Browse files Browse the repository at this point in the history
  • Loading branch information
KrLite committed Sep 27, 2023
1 parent 5a00ab1 commit 31dcb90
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
18 changes: 17 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,26 @@ java {

jar {
from("LICENSE") {
rename { "${it}_${base.archivesName.get()}"}
rename { "${it}_${project.archivesBaseName}"}
}
}

tasks.register('collectJars', Copy) {
group = 'build'

def destinationFolder = file("$buildDir/libs/latest")

from("$buildDir/libs/${base.archivesBaseName}-${project.version}.jar")
from("$buildDir/libs/${base.archivesBaseName}-${project.version}-sources.jar")

subprojects { subproject ->
from("$subproject.buildDir/libs/${subproject.archivesBaseName}-${project.version}.jar")
from("$subproject.buildDir/libs/${subproject.archivesBaseName}-${project.version}-sources.jar")
}

into(destinationFolder)
}

publishing {
publications {
mavenJava(MavenPublication) {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ minecraft_version = 1.20
yarn_mappings = 1.20+build.1
loader_version = 0.14.22

mod_version = 3.0.0
mod_version = 2.6.0
maven_group = net.krlite
archives_base_name = equator

Expand Down

0 comments on commit 31dcb90

Please sign in to comment.