Skip to content

Commit

Permalink
refactor(INJI-541): change release keystore name to dummy release key…
Browse files Browse the repository at this point in the history
…store (#1037)

* feat(INJI-541): for sonar qube generate dummy release keystore file in build.gradle

Signed-off-by: PuBHARGAVI <[email protected]>

* fix(INJI-541): pass sonar args as input variable in internal build yml file

Signed-off-by: PuBHARGAVI <[email protected]>

* refactor(INJI-541): change release keystore name to dummyrelease keystore

Signed-off-by: PuBHARGAVI <[email protected]>

---------

Signed-off-by: PuBHARGAVI <[email protected]>
  • Loading branch information
PuBHARGAVI authored Nov 29, 2023
1 parent 90e9f5a commit eef1eb7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .talismanrc
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,6 @@ fileignoreconfig:
- filename: ios/fastlane/Fastfile
checksum: feea5a7f044ef6961d53e7d1e1ffb92a3e0f72761496424f6e64288e3718d605
- filename: android/app/build.gradle
checksum: d2164820003c0565191032cd2cbd19ed89eae5375ee43633ef59363c79878144
checksum: c2d2ab90258fc346d2f2d57b360883b6e57540eac5467a8e8438c2d5eada90df
version: ""

15 changes: 13 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {

apply plugin: "com.android.application"
apply plugin: "com.facebook.react"
apply plugin: "org.sonarqube"

react {
/* Folders */
Expand Down Expand Up @@ -125,7 +126,7 @@ android {
release {
// for sonarqube job we will generate dummy release keystore to sign the app as we are not doing it in workflow
def hasSonarqube = System.properties.containsKey("sonarqube")
def keystore = file('release.keystore')
def keystore = file('release.keystore').exists() ? file('release.keystore') : file('dummyrelease.keystore')
if (hasSonarqube && !keystore.exists() ) {
exec {
commandLine 'keytool',
Expand All @@ -138,7 +139,7 @@ android {
'-storepass', System.getenv("RELEASE_KEYSTORE_PASSWORD"),
'-keypass', System.getenv("RELEASE_KEYSTORE_PASSWORD"),
'-alias', System.getenv("RELEASE_KEYSTORE_ALIAS"),
'-keystore', 'release.keystore',
'-keystore', 'dummyrelease.keystore',
'-dname', 'CN=,OU=,O=,L=,S=,C=US'
}
}
Expand Down Expand Up @@ -225,6 +226,16 @@ android {
outputFileName = "Inji_${architecture}.apk"
}
}

android.applicationVariants.all { variant ->
variant.outputs.all { output ->
if (variant.flavorName == "collab") {
sonarqube {
androidVariant variant.name
}
}
}
}
}

dependencies {
Expand Down
7 changes: 0 additions & 7 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ buildscript {
}
}

project(":app") {
apply plugin: "org.sonarqube"
sonarqube {
androidVariant "collabDebug"
}
}

// @generated begin expo-camera-import - expo prebuild (DO NOT MODIFY) sync-f244f4f3d8bf7229102e8f992b525b8602c74770
def expoCameraMavenPath = new File(["node", "--print", "require.resolve('expo-camera/package.json')"].execute(null, rootDir).text.trim(), "../android/maven")
allprojects { repositories { maven { url(expoCameraMavenPath) } } }
Expand Down

0 comments on commit eef1eb7

Please sign in to comment.