diff --git a/Jenkinsfile.groovy b/Jenkinsfile.groovy index 79233fa0..1ab8d7df 100644 --- a/Jenkinsfile.groovy +++ b/Jenkinsfile.groovy @@ -10,22 +10,23 @@ pipeline { environment { // ANDROID_HOME = "/usr/local/android/sdk" // Cambia in base al tuo sistema + JAVA_HOME = tool 'JDK 17.0.6 x64' // Nome dello strumento configurato in Jenkins GRADLE_HOME = tool 'Gradle 8.13' // Nome dello strumento configurato in Jenkins - PATH = "${env.GRADLE_HOME}/bin:${env.PATH}" + PATH = "${env.GRADLE_HOME}/bin:${env.JAVA_HOME}/bin:${env.PATH}" } stages { stage('Preparing project') { steps { - powershell "(gc gradle.properties) -replace 'org.gradle.caching=true', 'org.gradle.caching=false' | Out-File -encoding ASCII gradle.properties" - powershell "(gc gradle.properties) -replace 'org.gradle.unsafe.configuration-cache=ON', 'org.gradle.unsafe.configuration-cache=OFF' | Out-File -encoding ASCII gradle.properties" + // powershell "(gc gradle.properties) -replace 'org.gradle.caching=true', 'org.gradle.caching=false' | Out-File -encoding ASCII gradle.properties" + // powershell "(gc gradle.properties) -replace 'org.gradle.unsafe.configuration-cache=ON', 'org.gradle.unsafe.configuration-cache=OFF' | Out-File -encoding ASCII gradle.properties" } } stage('Build') { steps { - bat "gradle app:build --stacktrace" + bat "./gradlew assembleRelease" } } } diff --git a/app/build.gradle b/app/build.gradle index 1bafae1a..0eca9148 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -53,7 +53,8 @@ android { ext.enableCrashlytics = false } release { - minifyEnabled false + minifyEnabled true // Abilita la minimizzazione del codice + shrinkResources true // Rimuove risorse non utilizzate proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' signingConfig signingConfigs.release }