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'
|
annotationProcessor 'org.projectlombok:lombok:1.18.34'
|
||||||
}
|
}
|
||||||
|
|
||||||
shadowJar {
|
tasks.register('cargoBuild', Exec) {
|
||||||
jar.archiveClassifier = archiveClassifier = osdetector.classifier
|
workingDir '.'
|
||||||
dependencies {
|
commandLine 'cargo', 'build', '--release', '--features=java'
|
||||||
include(dependency('com.github.adamheinrich:native-utils:master-SNAPSHOT'))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def rustDir = projectDir.toPath()
|
def rustDir = projectDir.toPath()
|
||||||
|
@ -44,8 +42,8 @@ def rustDir = projectDir.toPath()
|
||||||
.resolve('target')
|
.resolve('target')
|
||||||
.resolve('release')
|
.resolve('release')
|
||||||
.toFile()
|
.toFile()
|
||||||
|
shadowJar {
|
||||||
processResources {
|
dependsOn cargoBuild
|
||||||
outputs.upToDateWhen { false } // no caching
|
outputs.upToDateWhen { false } // no caching
|
||||||
from(rustDir) {
|
from(rustDir) {
|
||||||
include('*.dll')
|
include('*.dll')
|
||||||
|
@ -53,17 +51,15 @@ processResources {
|
||||||
include('*dylib')
|
include('*dylib')
|
||||||
into('natives/')
|
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
|
build.finalizedBy shadowJar
|
||||||
|
|
||||||
|
|
||||||
mavenPublishing {
|
mavenPublishing {
|
||||||
//publishToMavenCentral(SonatypeHost.S01) // for snapshots
|
//publishToMavenCentral(SonatypeHost.S01) // for snapshots
|
||||||
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) // central repository
|
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) // central repository
|
||||||
|
|
Loading…
Reference in a new issue