From a4222bec526726be8e13beccb99fb001e72a4f98 Mon Sep 17 00:00:00 2001 From: Benjamin Amos Date: Wed, 13 Oct 2021 20:29:47 +0100 Subject: [PATCH 1/2] Updates to Jenkinsfile to build Android. --- Jenkinsfile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index b7b4ea24d..7493aac0c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,4 @@ -node ("default-java || heavy-java") { +node ("android") { stage('Checkout') { echo "Going to check out the things !" checkout scm @@ -21,6 +21,18 @@ node ("default-java || heavy-java") { recordIssues tool: pmdParser(pattern: '**/build/reports/pmd/*.xml') recordIssues tool: taskScanner(includePattern: '**/*.java,**/*.groovy,**/*.gradle', lowTags: 'WIBNIF', normalTags: 'TODO', highTags: 'ASAP') } + stage('Build Android') { + sh 'echo sdk.dir=/opt/android-sdk > local.properties' + dir('android') { + checkout changelog: false, poll: false, scm: [$class: 'GitSCM', branches: [[name: '*/sdk-version-fixes']], extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: '']], userRemoteConfigs: [[url: 'https://github.com/BenjaminAmos/DestSolAndroid.git']]] + } + sh './gradlew --console=plain :android:assembleDebug' + archiveArtifacts 'android/build/outputs/apk/debug/android-debug.apk' + } + stage('Record Android') { + sh './gradlew --console=plain :android:lint' + recordIssues tool: androidLintParser(pattern: 'android/build/reports/lint-results.xml') + } stage('Notify') { withCredentials([string(credentialsId: 'destsolDiscordWebhook', variable: 'WEBHOOK')]) { discordSend title: env.BRANCH_NAME, link: env.BUILD_URL, result: currentBuild.currentResult, webhookURL: env.WEBHOOK From 313722fa2596f5207f6e59c29c21fe1aec8f2ea2 Mon Sep 17 00:00:00 2001 From: Benjamin Amos Date: Thu, 14 Oct 2021 20:07:38 +0100 Subject: [PATCH 2/2] Update references from my fork to the MovingBlocks repository --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7493aac0c..984e86eec 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,7 +24,7 @@ node ("android") { stage('Build Android') { sh 'echo sdk.dir=/opt/android-sdk > local.properties' dir('android') { - checkout changelog: false, poll: false, scm: [$class: 'GitSCM', branches: [[name: '*/sdk-version-fixes']], extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: '']], userRemoteConfigs: [[url: 'https://github.com/BenjaminAmos/DestSolAndroid.git']]] + checkout scm: [$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[url: 'https://github.com/MovingBlocks/DestSolAndroid.git']]] } sh './gradlew --console=plain :android:assembleDebug' archiveArtifacts 'android/build/outputs/apk/debug/android-debug.apk'