Fix headless jar build on Java 11, add to CI pipeline.

This commit is contained in:
akwizgran
2021-12-13 15:38:17 +00:00
parent 3b03db9f43
commit 07b35db4d4
2 changed files with 6 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ test:
stage: test
script:
- ./gradlew --no-daemon -Djava.security.egd=file:/dev/urandom animalSnifferMain animalSnifferTest
- ./gradlew --no-daemon -Djava.security.egd=file:/dev/urandom :briar-headless:linuxJars
- ./gradlew --no-daemon -Djava.security.egd=file:/dev/urandom compileOfficialDebugAndroidTestSources compileScreenshotDebugAndroidTestSources check
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'

View File

@@ -58,6 +58,7 @@ void jarFactory(Jar jarTask, jarArchitecture) {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
{
it.duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
String[] architectures = ["linux-aarch64", "linux-armhf", "linux-x86_64"]
for (String arch : architectures) {
if (arch != jarArchitecture) {
@@ -111,6 +112,10 @@ task x86LinuxJar(type: Jar) {
jarFactory(it, 'linux-x86_64')
}
task linuxJars {
dependsOn(aarch64LinuxJar, armhfLinuxJar, x86LinuxJar)
}
// At the moment for non-Android projects we need to explicitly mark the code generated by kapt
// as 'generated source code' for correct highlighting and resolve in IDE.
idea {