Commit 17417221 authored by Christophe Henry's avatar Christophe Henry

~

parent f646c563
Pipeline #3734 passed with stage
in 0 seconds
...@@ -55,14 +55,6 @@ pipeline { ...@@ -55,14 +55,6 @@ pipeline {
} }
stages { stages {
stage("Compile") {
steps {
gitlabCommitStatus("Compile") {
sh "./gradlew compileReleaseSources"
}
}
}
stage("Lint") { stage("Lint") {
steps { steps {
gitlabCommitStatus("Lint") { gitlabCommitStatus("Lint") {
...@@ -99,21 +91,25 @@ pipeline { ...@@ -99,21 +91,25 @@ pipeline {
} }
} }
stage("on min SDK level") { stage("Run instrumented tests") {
steps { parallel {
gitlabCommitStatus("Instrumented tests on min SDK image") { stage("on min SDK level") {
withAvd(hardwareProfile: "Nexus 5X", systemImage: env.MIN_SDK_IMAGE, headless: true) { steps {
sh "./gradlew clean connectedCheck" gitlabCommitStatus("Instrumented tests on min SDK image") {
withAvd(hardwareProfile: "Nexus 5X", systemImage: env.MIN_SDK_IMAGE, headless: true) {
sh "./gradlew clean connectedCheck"
}
}
} }
} }
}
}
stage("on max SDK level") { stage("on max SDK level") {
steps { steps {
gitlabCommitStatus("Instrumented tests on max SDK image") { gitlabCommitStatus("Instrumented tests on max SDK image") {
withAvd(hardwareProfile: "Nexus 5X", systemImage: env.MAX_SDK_IMAGE, headless: true) { withAvd(hardwareProfile: "Nexus 5X", systemImage: env.MAX_SDK_IMAGE, headless: true) {
sh "./gradlew clean connectedCheck" sh "./gradlew clean connectedCheck"
}
}
} }
} }
} }
...@@ -122,7 +118,7 @@ pipeline { ...@@ -122,7 +118,7 @@ pipeline {
stage("Build APK") { stage("Build APK") {
steps { steps {
gitlabCommitStatus("Build APK") { gitlabCommitStatus("Build APK") {
sh("""./gradlew clean assembleRelease \ sh("""./gradlew clean assembleJenkins \
-Pandroid.injected.signing.store.file=${env.SIGN_KEY_PATH} \ -Pandroid.injected.signing.store.file=${env.SIGN_KEY_PATH} \
-Pandroid.injected.signing.store.password=${env.SIGN_KEY_CREDENTIALS_PSW} \ -Pandroid.injected.signing.store.password=${env.SIGN_KEY_CREDENTIALS_PSW} \
-Pandroid.injected.signing.key.alias=${env.SIGN_KEY_CREDENTIALS_USR} \ -Pandroid.injected.signing.key.alias=${env.SIGN_KEY_CREDENTIALS_USR} \
...@@ -145,11 +141,10 @@ pipeline { ...@@ -145,11 +141,10 @@ pipeline {
def getBuildSteps(String branch) { def getBuildSteps(String branch) {
def buildSteps = [ def buildSteps = [
"Compile",
"Lint", "Lint",
"Unit tests", "Unit tests",
"Instrumented tests on min SDK image", "Instrumented tests on min SDK image",
"Instrumented tests on max SDK image" "Instrumented tests on max SDK image",
] ]
if(branch == "develop") return buildSteps + ["Build APK"] if(branch == "develop") return buildSteps + ["Build APK"]
return buildSteps return buildSteps
......
...@@ -34,20 +34,6 @@ android { ...@@ -34,20 +34,6 @@ android {
freeCompilerArgs = ["-Xallow-result-return-type"] freeCompilerArgs = ["-Xallow-result-return-type"]
} }
testOptions {
unitTests.all {
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
outputs.upToDateWhen { false }
showStandardStreams = true
}
}
}
lintOptions {
disable "AllowBackup", "VectorPath", "GradleDependency", "MissingTranslation", "InvalidPackage"
}
sourceSets { sourceSets {
androidTest.assets.srcDirs += files(schema_location) androidTest.assets.srcDirs += files(schema_location)
} }
...@@ -57,14 +43,9 @@ android { ...@@ -57,14 +43,9 @@ android {
minifyEnabled false minifyEnabled false
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
} }
} jenkins {
initWith release
dataBinding { }
enabled = true
}
configurations.all {
resolutionStrategy.force "com.google.code.findbugs:jsr305:1.3.9"
} }
applicationVariants.all { variant -> applicationVariants.all { variant ->
...@@ -73,14 +54,34 @@ android { ...@@ -73,14 +54,34 @@ android {
delete new FileNameFinder().getFileNames(buildDir.absolutePath, "**/config.properties") delete new FileNameFinder().getFileNames(buildDir.absolutePath, "**/config.properties")
} }
} }
variant.outputs.all { output -> variant.outputs.all { output ->
outputFileName = new File("FreshRSS-Jenkins-${variant.versionName}-${variant.name}.apk") if (variant.name == "jenkins") outputFileName = new File("FreshRSS-develop-jenkins.apk")
else outputFileName = new File("FreshRSS-${variant.versionName}-${variant.name}.apk")
} }
} }
androidExtensions { androidExtensions {
experimental = true experimental = true
} }
dataBinding {
enabled = true
}
testOptions {
unitTests.all {
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
outputs.upToDateWhen { false }
showStandardStreams = true
}
}
}
lintOptions {
disable "AllowBackup", "VectorPath", "GradleDependency", "MissingTranslation", "InvalidPackage"
}
} }
configurations { configurations {
...@@ -111,7 +112,6 @@ dependencies { ...@@ -111,7 +112,6 @@ dependencies {
def roomigrant_version = "0.1.7" def roomigrant_version = "0.1.7"
def jackson_version = '2.10.2' def jackson_version = '2.10.2'
def espresso_version = "3.2.0" def espresso_version = "3.2.0"
def promise_version = "3.3.0"
def android_navigation = "1.0.0" def android_navigation = "1.0.0"
def jsoup_version = '1.12.2' def jsoup_version = '1.12.2'
def acraVersion = '5.5.0' def acraVersion = '5.5.0'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment