mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-22 07:14:50 +01:00
ci(java): produce artifact with no classifier without native
This commit is contained in:
parent
3e68897f5f
commit
062f10b68a
1 changed files with 10 additions and 14 deletions
24
dist/java/build.gradle
vendored
24
dist/java/build.gradle
vendored
|
@ -31,11 +31,9 @@ dependencies {
|
|||
annotationProcessor 'org.projectlombok:lombok:1.18.34'
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
jar.archiveClassifier = archiveClassifier = osdetector.classifier
|
||||
dependencies {
|
||||
include(dependency('com.github.adamheinrich:native-utils:master-SNAPSHOT'))
|
||||
}
|
||||
tasks.register('cargoBuild', Exec) {
|
||||
workingDir '.'
|
||||
commandLine 'cargo', 'build', '--release', '--features=java'
|
||||
}
|
||||
|
||||
def rustDir = projectDir.toPath()
|
||||
|
@ -44,8 +42,8 @@ def rustDir = projectDir.toPath()
|
|||
.resolve('target')
|
||||
.resolve('release')
|
||||
.toFile()
|
||||
|
||||
processResources {
|
||||
shadowJar {
|
||||
dependsOn cargoBuild
|
||||
outputs.upToDateWhen { false } // no caching
|
||||
from(rustDir) {
|
||||
include('*.dll')
|
||||
|
@ -53,17 +51,15 @@ processResources {
|
|||
include('*dylib')
|
||||
into('natives/')
|
||||
}
|
||||
|
||||
archiveClassifier = osdetector.classifier
|
||||
dependencies {
|
||||
include(dependency('com.github.adamheinrich:native-utils:master-SNAPSHOT'))
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register('cargoBuild', Exec) {
|
||||
workingDir '.'
|
||||
commandLine 'cargo', 'build', '--release', '--features=java'
|
||||
}
|
||||
|
||||
processResources.dependsOn cargoBuild
|
||||
build.finalizedBy shadowJar
|
||||
|
||||
|
||||
mavenPublishing {
|
||||
//publishToMavenCentral(SonatypeHost.S01) // for snapshots
|
||||
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) // central repository
|
||||
|
|
Loading…
Reference in a new issue