-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(gradle): migrate build.gradle to KTS based gradle files
SUITEDEV-35237 Co-authored-by: davidSchuppa <[email protected]> Co-authored-by: LasOri <[email protected]> Co-authored-by: matusekma <[email protected]>
- Loading branch information
1 parent
b0c80fc
commit 81988b5
Showing
39 changed files
with
426 additions
and
482 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
USE_LOCAL_DEPENDENCY= | ||
GOOGLE_SERVICES_API_KEY= | ||
RELEASE_MODE= | ||
ANDROID_RELEASE_STORE_FILE_BASE64= | ||
ANDROID_RELEASE_STORE_PASSWORD= | ||
ANDROID_RELEASE_KEY_ALIAS= | ||
ANDROID_RELEASE_KEY_PASSWORD= | ||
FIREBASE_PROJECT_ID= | ||
FIREBASE_SERVICE_ACCOUNT_JSON= | ||
GOOGLE_OAUTH_SERVER_CLIENT_ID= | ||
GOOGLE_SERVICES_JSON_BASE64= | ||
OSSRH_USERNAME= | ||
OSSRH_PASSWORD= | ||
SONATYPE_STAGING_PROFILE_ID= | ||
SONATYPE_SIGNING_KEY_ID= | ||
SONATYPE_SIGNING_PASSWORD= | ||
SONATYPE_SIGNING_SECRET_KEY_RING_FILE= | ||
DETECT_LATEST_RELEASE_VERSION= | ||
DETECT_PROJECT_USER_GROUPS= | ||
DETECT_PROJECT_VERSION_DISTRIBUTION= | ||
BLACKDUCK_ACCESS_TOKEN= | ||
BLACKDUCK_URL= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import org.ajoberstar.grgit.Grgit | ||
import java.io.FileInputStream | ||
import java.util.Properties | ||
|
||
plugins { | ||
alias(libs.plugins.androidLibrary) apply false | ||
alias(libs.plugins.androidApplication) apply false | ||
alias(libs.plugins.kotlin) apply false | ||
alias(libs.plugins.kapt) apply false | ||
alias(libs.plugins.navigationSafeArgs) apply false | ||
alias(libs.plugins.googleServices) apply false | ||
alias(libs.plugins.kotlinAllOpen) apply false | ||
alias(libs.plugins.grGit) | ||
id("com.github.ben-manes.versions") version "0.46.0" | ||
} | ||
|
||
versionData() | ||
loadDevConfig() | ||
|
||
fun loadDevConfig() { | ||
|
||
ext["devConfig"] = Properties() | ||
|
||
try { | ||
val inputStream = FileInputStream("$projectDir/localConfig.properties") | ||
(ext["devConfig"] as Properties).load(inputStream) | ||
|
||
} catch (ignore: Exception) { | ||
} | ||
|
||
if (ext["devConfig"] != null) { | ||
println("Using devConfig: ${ext["devConfig"]}") | ||
} | ||
} | ||
|
||
fun versionData() { | ||
val git = Grgit.open( | ||
mapOf("currentDir" to project.rootDir) | ||
) | ||
|
||
if ((if (System.getenv("BLACKDUCK") == null) false else System.getenv("BLACKDUCK")) == false) { | ||
git.fetch() | ||
} | ||
if (git.describe() == null) { | ||
throw RuntimeException("Couldn't get Version Name") | ||
} | ||
val v = GitVersion( | ||
versionName = | ||
if (System.getenv("RELEASE_VERSION") == null) git.describe() else System.getenv( | ||
"RELEASE_VERSION" | ||
), | ||
versionCode = ((System.currentTimeMillis() - 1602845230) / 10000).toInt(), | ||
versionCodeTime = git.head().time | ||
) | ||
ext["gitVersionName"] = v.versionName | ||
ext["gitVersionCode"] = v.versionCode | ||
ext["gitVersionCodeTime"] = v.versionCodeTime | ||
|
||
println("versionName: ${v.versionName}") | ||
println("versionCode: ${v.versionCode}") | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
data class GitVersion(val versionName: String, val versionCode: Int, val versionCodeTime: Long) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
plugins { | ||
alias(libs.plugins.androidLibrary) | ||
alias(libs.plugins.kotlin) | ||
alias(libs.plugins.kapt) | ||
alias(libs.plugins.kotlinAllOpen) | ||
} | ||
dependencies { | ||
api(libs.androidx.annotation) | ||
api(libs.androidx.appcompat) | ||
api(libs.kotlin.stdlib) | ||
api(libs.androidx.espresso.idling.resource) | ||
api(libs.androidx.lifecycle.common.java8) | ||
api(libs.androidx.lifecycle.process) | ||
api(libs.androidx.security.crypto) | ||
androidTestImplementation(project(":testUtils")) | ||
} | ||
android { | ||
namespace = "com.emarsys.core.api" | ||
} | ||
kotlin { jvmToolchain(17) } |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
plugins { | ||
alias(libs.plugins.androidLibrary) | ||
alias(libs.plugins.kotlin) | ||
alias(libs.plugins.kapt) | ||
alias(libs.plugins.kotlinAllOpen) | ||
} | ||
|
||
dependencies { | ||
implementation(project(":core-api")) | ||
implementation(libs.google.tink) | ||
implementation(libs.kotlinx.coroutines.core) | ||
|
||
androidTestImplementation(project(":testUtils")) | ||
} | ||
android { | ||
namespace = "com.emarsys.core" | ||
} | ||
|
||
kotlin { | ||
jvmToolchain(17) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 17 additions & 7 deletions
24
emarsys-e2e-test/build.gradle → emarsys-e2e-test/build.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,24 @@ | ||
plugins { | ||
alias(libs.plugins.androidLibrary) | ||
alias(libs.plugins.kotlin) | ||
alias(libs.plugins.kapt) | ||
alias(libs.plugins.kotlinAllOpen) | ||
} | ||
|
||
dependencies { | ||
implementation project(':core-api') | ||
implementation project(':core') | ||
implementation project(':mobile-engage') | ||
implementation project(':mobile-engage-api') | ||
implementation(project(":core-api")) | ||
implementation(project(":core")) | ||
implementation(project(":mobile-engage")) | ||
implementation(project(":mobile-engage-api")) | ||
|
||
api Libs.firebase_messaging, { exclude group: 'androidx' } | ||
api(libs.google.fcm, { exclude group: 'androidx' }) | ||
|
||
androidTestImplementation project(':testUtils') | ||
androidTestImplementation(project(":testUtils")) | ||
} | ||
android { | ||
namespace "com.emarsys.firebase" | ||
sourceCompatibility = 17 | ||
namespace = "com.emarsys.firebase" | ||
} | ||
|
||
kotlin { | ||
jvmToolchain(17) | ||
} |
Oops, something went wrong.