Skip to content
Snippets Groups Projects
Commit fc615843 authored by Krishna Prasad's avatar Krishna Prasad
Browse files

Minor changes in jenkins and fastlane file, updated the app version

parent fbd698ba
No related branches found
No related tags found
No related merge requests found
...@@ -10,16 +10,8 @@ pipeline { ...@@ -10,16 +10,8 @@ pipeline {
} }
stages { stages {
/* stage('Build') { // STAGE 1 - Build the application
steps { stage('Build') {
script {
// Your initial build steps here
echo 'Building...'
}
}
}
stage('upload to drive') {
steps { steps {
script { script {
// Use absolute path to Fastlane // Use absolute path to Fastlane
...@@ -27,12 +19,12 @@ pipeline { ...@@ -27,12 +19,12 @@ pipeline {
env.PATH = "${fastlanePath}:${env.PATH}" env.PATH = "${fastlanePath}:${env.PATH}"
// Run Fastlane deploy for Firebase App distribution // Run Fastlane deploy for Firebase App distribution
sh 'sudo fastlane deployToDrive' sh 'fastlane build'
}
} }
} }
} */ // STAGE 2 - Upload the build to Firebase App Distribution Channel
stage('Firebase App Distribution') { stage('Firebase App Distribution') {
steps { steps {
script { script {
...@@ -46,6 +38,7 @@ pipeline { ...@@ -46,6 +38,7 @@ pipeline {
} }
} }
// STAGE 3 - Upload the build to Google Playstore Alpha Track
stage('Playstore Alpha Testing') { stage('Playstore Alpha Testing') {
steps { steps {
script { script {
...@@ -61,8 +54,6 @@ pipeline { ...@@ -61,8 +54,6 @@ pipeline {
} }
post { post {
always { always {
// Clean up steps if needed // Clean up steps if needed
......
...@@ -21,8 +21,8 @@ android { ...@@ -21,8 +21,8 @@ android {
applicationId = "com.kp.testapp" applicationId = "com.kp.testapp"
minSdk = 25 minSdk = 25
targetSdk = 34 targetSdk = 34
versionCode = 2 versionCode = 3
versionName = "1.0.1" versionName = "1.0.3"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables { vectorDrawables {
......
...@@ -16,18 +16,25 @@ ...@@ -16,18 +16,25 @@
default_platform(:android) default_platform(:android)
platform :android do platform :android do
# get the required prerequisites like credentials, app ids etc.
before_all do before_all do
ENV["FIREBASE_LOGIN_CREDENTIALS"] = "fastlane/fastlane-admin-app-distribution.json" ENV["FIREBASE_LOGIN_CREDENTIALS"] = "fastlane/fastlane-admin-app-distribution.json"
ENV["FIREBASE_APP_ID"] = "1:771295755070:android:5007592bd3aba1c3ec0a6f" ENV["FIREBASE_APP_ID"] = "1:771295755070:android:5007592bd3aba1c3ec0a6f"
end end
######## FIREBASE DISTRIBUTION ######## ######## Generate the Apk and App bundle ########
desc "Submit a new Google Test Build to Firebase App Distribution" desc "build the apk or bundle"
lane :build do
gradle(task: "clean assembleDebug") # generates debug build
gradle(task: "bundleRelease") # generates signed release bundle
end
######## Upload apk to Firebase Distribution Channel ########
desc "Upload build to Firebase App Distribution"
lane :distributeViaFirebase do |options| lane :distributeViaFirebase do |options|
#gradle(task: "bundleRelease") #gradle(task: "clean assembleDebug")
gradle(task: "clean assembleDebug")
#apk_path = "app/build/outputs/bundle/release/app-release.aab"
apk_path = "app/build/outputs/apk/debug/app-debug.apk" apk_path = "app/build/outputs/apk/debug/app-debug.apk"
firebase_app_distribution( firebase_app_distribution(
...@@ -39,24 +46,19 @@ platform :android do ...@@ -39,24 +46,19 @@ platform :android do
) )
end end
desc "build the apk" ######## Upload app bundle to Google Playstore Alpha Track ########
lane :build do desc "Deploy a new version to the Google Play Store - Alpha Track"
gradle(task: "bundleRelease")
#gradle(task: "clean assembleDebug")
# gradle(task: "clean assembleRelease")
end
desc "Deploy a new version to the Google Play - Alpha"
lane :deployToPlaystoreAlpha do lane :deployToPlaystoreAlpha do
gradle(task: "bundleRelease") #gradle(task: "bundleRelease")
upload_to_play_store( upload_to_play_store(
track: "alpha", track: "alpha", # alpha or beta or internal or production
json_key: "/home/karthik_shetty_niveussolutions_c/prj-common-services-01-0c9b948542c2.json", json_key: "/home/karthik_shetty_niveussolutions_c/prj-common-services-01-0c9b948542c2.json",
package_name: "com.kp.testapp", package_name: "com.kp.testapp",
aab: "app/build/outputs/bundle/release/app-release.aab", aab: "app/build/outputs/bundle/release/app-release.aab",
skip_upload_metadata: true, # Set to false if you want to upload metadata (e.g., changelog) skip_upload_metadata: true, # Set to false if you want to upload metadata (e.g., changelog)
skip_upload_images: true, # Set to false if you want to upload screenshots, feature graphics, etc. skip_upload_images: true, # Set to false if you want to upload screenshots, feature graphics, etc.
skip_upload_apk: true skip_upload_apk: true # Set to true if opting for App Bundle
) )
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment