diff --git a/Jenkinsfile b/Jenkinsfile index 97354c9..dabeb25 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,18 +1,27 @@ -stage('Build Android APK') { - agent { label 'linux' } - environment { - ANDROID_HOME = '/opt/android-sdk' - ANDROID_SDK_ROOT = '/opt/android-sdk' - PATH = "/opt/android-sdk/cmdline-tools/latest/bin:/opt/android-sdk/platform-tools:${env.PATH}" - } - steps { - cleanWs() - checkout scm +pipeline { + agent none - sh ''' - ./gradlew clean assembleDebug - ''' + stages { + stage('Build Android APK') { + agent { label 'linux' } - archiveArtifacts artifacts: '**/build/outputs/apk/**/*.apk', fingerprint: true + environment { + ANDROID_HOME = '/opt/android-sdk' + ANDROID_SDK_ROOT = '/opt/android-sdk' + PATH = "/opt/android-sdk/cmdline-tools/latest/bin:/opt/android-sdk/platform-tools:${env.PATH}" + } + + steps { + cleanWs() + checkout scm + + sh ''' + chmod +x ./gradlew + ./gradlew clean assembleDebug + ''' + + archiveArtifacts artifacts: '**/build/outputs/apk/**/*.apk', fingerprint: true + } + } } } \ No newline at end of file