diff --git a/app/build.gradle b/app/build.gradle deleted file mode 100644 index ba0cb9464c..0000000000 --- a/app/build.gradle +++ /dev/null @@ -1,279 +0,0 @@ -plugins { - id 'com.android.application' - id 'kotlin-android' - id 'kotlin-kapt' - id 'kotlin-allopen' - id 'kotlinx-serialization' - id 'com.google.gms.google-services' - id 'com.google.firebase.crashlytics' -} - -apply from: "${project.rootDir}/core/main/android_dependencies.gradle" -apply from: "${project.rootDir}/core/main/jacoco_global.gradle" - -repositories { - mavenCentral() - google() -} - -def generateGitBuild = { -> - StringBuilder stringBuilder = new StringBuilder() - try { - def stdout = new ByteArrayOutputStream() - exec { - commandLine 'git', 'describe', '--always' - standardOutput = stdout - } - String commitObject = stdout.toString().trim() - stringBuilder.append(commitObject) - } catch (ignored) { - stringBuilder.append('NoGitSystemAvailable') - } - return stringBuilder.toString() -} - -def generateGitRemote = { -> - StringBuilder stringBuilder = new StringBuilder() - try { - def stdout = new ByteArrayOutputStream() - exec { - commandLine 'git', 'remote', 'get-url', 'origin' - standardOutput = stdout - } - String commitObject = stdout.toString().trim() - stringBuilder.append(commitObject) - } catch (ignored) { - stringBuilder.append('NoGitSystemAvailable') - } - return stringBuilder.toString() -} - -def generateDate = { -> - StringBuilder stringBuilder = new StringBuilder() - // showing only date prevents app to rebuild everytime - stringBuilder.append((new Date()).format('yyyy.MM.dd')) - return stringBuilder.toString() -} - -def isMaster = { -> - return !version.contains('-') -} - -def gitAvailable = { -> - StringBuilder stringBuilder = new StringBuilder() - try { - def stdout = new ByteArrayOutputStream() - exec { - commandLine 'git', '--version' - standardOutput = stdout - } - String commitObject = stdout.toString().trim() - stringBuilder.append(commitObject) - } catch (ignored) { - return false // NoGitSystemAvailable - } - return !stringBuilder.toString().isEmpty() - -} - -def allCommitted = { -> - StringBuilder stringBuilder = new StringBuilder() - try { - def stdout = new ByteArrayOutputStream() - exec { - commandLine 'git', 'status', '-s' - standardOutput = stdout - } - // ignore all changes done in .idea/codeStyles - String cleanedList = stdout.toString().replaceAll(/(?m)^\s*(M|A|D|\?\?)\s*.*?\.idea\/codeStyles\/.*?\s*$/, "") - // ignore all files added to project dir but not staged/known to GIT - cleanedList = cleanedList.replaceAll(/(?m)^\s*(\?\?)\s*.*?\s*$/, "") - stringBuilder.append(cleanedList.trim()) - } catch (ignored) { - return false // NoGitSystemAvailable - } - return stringBuilder.toString().isEmpty() -} - -android { - - namespace 'app.aaps' - ndkVersion "21.1.6352462" - - defaultConfig { - multiDexEnabled true - versionCode 1500 - version "3.2.0-dev-m" - buildConfigField "String", "VERSION", '"' + version + '"' - buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"' - buildConfigField "String", "REMOTE", '"' + generateGitRemote() + '"' - buildConfigField "String", "HEAD", '"' + generateGitBuild() + '"' - buildConfigField "String", "COMMITTED", '"' + allCommitted() + '"' - - } - - flavorDimensions = ["standard"] - productFlavors { - full { - applicationId "info.nightscout.androidaps" - dimension "standard" - resValue "string", "app_name", "AAPS" - versionName version - manifestPlaceholders = [ - appIcon : "@mipmap/ic_launcher", - appIconRound: "@mipmap/ic_launcher_round" - ] - } - pumpcontrol { - applicationId "info.nightscout.aapspumpcontrol" - dimension "standard" - resValue "string", "app_name", "Pumpcontrol" - versionName version + "-pumpcontrol" - manifestPlaceholders = [ - appIcon : "@mipmap/ic_pumpcontrol", - appIconRound: "@null" - ] - } - aapsclient { - applicationId "info.nightscout.aapsclient" - dimension "standard" - resValue "string", "app_name", "AAPSClient" - versionName version + "-aapsclient" - manifestPlaceholders = [ - appIcon : "@mipmap/ic_yellowowl", - appIconRound: "@mipmap/ic_yellowowl" - ] - } - aapsclient2 { - applicationId "info.nightscout.aapsclient2" - dimension "standard" - resValue "string", "app_name", "AAPSClient2" - versionName version + "-aapsclient" - manifestPlaceholders = [ - appIcon : "@mipmap/ic_blueowl", - appIconRound: "@mipmap/ic_blueowl" - ] - } - } - - useLibrary "org.apache.http.legacy" - - dataBinding { //Deleting it causes a binding error - enabled = true - } -} - -allprojects { - repositories { - } -} - -dependencies { - wearApp project(':wear') - - // in order to use internet's versions you'd need to enable Jetifier again - // https://github.com/nightscout/graphview.git - // https://github.com/nightscout/iconify.git - implementation project(':shared:impl') - implementation project(':core:main') - implementation project(':core:graphview') - implementation project(':core:interfaces') - implementation project(':core:libraries') - implementation project(':core:nssdk') - implementation project(':core:utils') - implementation project(':core:ui') - implementation project(':core:validators') - implementation project(':ui') - implementation project(':plugins:aps') - implementation project(':plugins:automation') - implementation project(':plugins:configuration') - implementation project(':plugins:constraints') - implementation project(':plugins:insulin') - implementation project(':plugins:main') - implementation project(':plugins:sensitivity') - implementation project(':plugins:smoothing') - implementation project(':plugins:source') - implementation project(':plugins:sync') - implementation project(':implementation') - implementation project(':database:entities') - implementation project(':database:impl') - implementation project(':pump:combo') - implementation project(':pump:combov2') - implementation project(':pump:dana') - implementation project(':pump:danars') - implementation project(':pump:danar') - implementation project(':pump:diaconn') - implementation project(':pump:eopatch') - implementation project(':pump:medtrum') - implementation project(':insight') - implementation project(':pump:medtronic') - implementation project(':pump:pump-common') - implementation project(':pump:omnipod-common') - implementation project(':pump:omnipod-eros') - implementation project(':pump:omnipod-dash') - implementation project(':pump:rileylink') - implementation project(':pump:virtual') - implementation project(':workflow') - - testImplementation project(':shared:tests') - - implementation fileTree(include: ['*.jar'], dir: 'libs') - - /* Dagger2 - We are going to use dagger.android which includes - * support for Activity and fragment injection so we need to include - * the following dependencies */ - kapt "com.google.dagger:dagger-android-processor:$dagger_version" - kapt "com.google.dagger:dagger-compiler:$dagger_version" - - // MainApp - api "com.uber.rxdogtag2:rxdogtag:2.0.2" - -} - -apply from: "${project.rootDir}/core/main/test_dependencies.gradle" - - -/* -// Run 'adb' shell command to clear application data of main app for 'debug' variant -task clearMainAppData(type: Exec) { - // we have to iterate to find the 'debug' variant to obtain a variant reference - android.applicationVariants.all { variant -> - if (variant.name == "fullDebug") { - def applicationId = [variant.mergedFlavor.applicationId, variant.buildType.applicationIdSuffix].findAll().join() - def clearDataCommand = ['adb', 'shell', 'pm', 'clear', applicationId] - println "Clearing application data of ${variant.name} variant: [${clearDataCommand}]" - def stdout = new ByteArrayOutputStream() - exec { - commandLine clearDataCommand - standardOutput = stdout - } - String result = stdout.toString().trim() - if (!result.startsWith("Success")) { - println result - throw new GradleException(clearDataCommand.join(" ")) - } - } - } -} -// Clear Application Data (once) before running instrumentation test -tasks.whenTaskAdded { task -> - // Both of these targets are equivalent today, although in future connectedCheck - // will also include connectedUiAutomatorTest (not implemented yet) - if(task.name == "connectedAndroidTest" || task.name == "connectedCheck"){ - task.dependsOn(clearMainAppData) - } -} -*/ - -printf('--------------\n') -printf('isMaster: %s\n', isMaster().toString()) -printf('gitAvailable: %s\n', gitAvailable().toString()) -printf('allCommitted: %s\n', allCommitted().toString()) -printf('--------------\n') -if (isMaster() && !gitAvailable()) { - throw new GradleException('GIT system is not available. On Windows try to run Android Studio as an Administrator. Check if GIT is installed and Studio have permissions to use it') -} -if (isMaster() && !allCommitted()) { - throw new GradleException('There are uncommitted changes. Clone sources again as described in wiki and do not allow gradle update') -} - diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 34cf8a4212..de2d0fc981 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -21,96 +21,104 @@ repositories { google() } -allOpen { - // allows mocking for classes w/o directly opening them for release builds - annotation("info.nightscout.androidaps.annotations.OpenForTesting") +fun generateGitBuild(): String { + val stringBuilder: StringBuilder = StringBuilder() + try { + val stdout = ByteArrayOutputStream() + exec { + commandLine("git", "describe", "--always") + standardOutput = stdout + } + val commitObject = stdout.toString().trim() + stringBuilder.append(commitObject) + } catch (ignored: Exception) { + stringBuilder.append("NoGitSystemAvailable") + } + return stringBuilder.toString() } -fun generateGitBuild(): String = +fun generateGitRemote(): String { + val stringBuilder: StringBuilder = StringBuilder() try { - ByteArrayOutputStream().let { - exec { - commandLine("git", "describe", "--always") - standardOutput = it - } - it.toString().trim() + val stdout = ByteArrayOutputStream() + exec { + commandLine("git", "remote", "get-url", "origin") + standardOutput = stdout } + val commitObject: String = stdout.toString().trim() + stringBuilder.append(commitObject) } catch (ignored: Exception) { - "NoGitSystemAvailable" + stringBuilder.append("NoGitSystemAvailable") } + return stringBuilder.toString() +} -fun generateGitRemote(): String = - try { - ByteArrayOutputStream().let { - exec { - commandLine("git", "remote", "get-url", "origin") - standardOutput = it - } - it.toString().trim() - } - } catch (ignored: Exception) { - "NoGitSystemAvailable" - } - -fun generateDate(): String = +fun generateDate(): String { + val stringBuilder: StringBuilder = StringBuilder() // showing only date prevents app to rebuild everytime - SimpleDateFormat("yyyy.MM.dd").format(Date()) + stringBuilder.append(SimpleDateFormat("yyyy.MM.dd").format(Date())) + return stringBuilder.toString() +} fun isMaster(): Boolean = !Versions.appVersion.contains("-") -fun gitAvailable(): Boolean = +fun gitAvailable(): Boolean { + val stringBuilder: StringBuilder = StringBuilder() try { - ByteArrayOutputStream().let { - exec { - commandLine("git", "--version") - standardOutput = it - } - it.toString().trim().isNotEmpty() + val stdout = ByteArrayOutputStream() + exec { + commandLine("git", "--version") + standardOutput = stdout } + val commitObject = stdout.toString().trim() + stringBuilder.append(commitObject) } catch (ignored: Exception) { - false // NoGitSystemAvailable + return false // NoGitSystemAvailable } + return !stringBuilder.toString().isEmpty() -fun allCommitted(): Boolean = +} + +fun allCommitted(): Boolean { + val stringBuilder: StringBuilder = StringBuilder() try { - ByteArrayOutputStream().let { - exec { - commandLine("git", "status", "-s") - standardOutput = it - } - it.toString() - // ignore all changes done in .idea/codeStyles - .replace(Regex("(?m)^\\s*(M|A|D|\\?\\?)\\s*.*?\\.idea\\/codeStyles\\/.*?\\s*$"), "") - // ignore all files added to project dir but not staged/known to GIT - .replace(Regex("(?m)^\\s*(\\?\\?)\\s*.*?\\s*$"), "") - .trim().isEmpty() + val stdout = ByteArrayOutputStream() + exec { + commandLine("git", "status", "-s") + standardOutput = stdout } + // ignore all changes done in .idea/codeStyles + val cleanedList: String = stdout.toString().replace("/(?m)^\\s*(M|A|D|\\?\\?)\\s*.*?\\.idea\\/codeStyles\\/.*?\\s*\$/", "") + // ignore all files added to project dir but not staged/known to GIT + .replace("/(?m)^\\s*(\\?\\?)\\s*.*?\\s*\$/", "") + stringBuilder.append(cleanedList.trim()) } catch (ignored: Exception) { - false // NoGitSystemAvailable + return false // NoGitSystemAvailable } + return stringBuilder.toString().isEmpty() +} android { - namespace = "info.nightscout.androidaps" + namespace = "app.aaps" ndkVersion = Versions.ndkVersion defaultConfig { multiDexEnabled = true versionCode = Versions.versionCode version = Versions.appVersion - buildConfigField("String", "VERSION", "\"" + Versions.appVersion + "\"") - buildConfigField("String", "BUILDVERSION", "\"" + generateGitBuild() + "-" + generateDate() + "\"") - buildConfigField("String", "REMOTE", "\"" + generateGitRemote() + "\"") - buildConfigField("String", "HEAD", "\"" + generateGitBuild() + "\"") - buildConfigField("Boolean", "COMMITTED", allCommitted().toString()) + buildConfigField("String", "VERSION", "\"$version\"") + buildConfigField("String", "BUILDVERSION", "\"${generateGitBuild()}-${generateDate()}\"") + buildConfigField("String", "REMOTE", "\"${generateGitRemote()}\"") + buildConfigField("String", "HEAD", "\"${generateGitBuild()}\"") + buildConfigField("String", "COMMITTED", "\"${allCommitted()}\"") } - val dim = "standard" - flavorDimensions.add(dim) + flavorDimensions.add("standard") productFlavors { create("full") { applicationId = "info.nightscout.androidaps" - dimension = dim + dimension = "standard" resValue("string", "app_name", "AAPS") versionName = Versions.appVersion manifestPlaceholders["appIcon"] = "@mipmap/ic_launcher" @@ -118,7 +126,7 @@ android { } create("pumpcontrol") { applicationId = "info.nightscout.aapspumpcontrol" - dimension = dim + dimension = "standard" resValue("string", "app_name", "Pumpcontrol") versionName = Versions.appVersion + "-pumpcontrol" manifestPlaceholders["appIcon"] = "@mipmap/ic_pumpcontrol" @@ -126,7 +134,7 @@ android { } create("aapsclient") { applicationId = "info.nightscout.aapsclient" - dimension = dim + dimension = "standard" resValue("string", "app_name", "AAPSClient") versionName = Versions.appVersion + "-aapsclient" manifestPlaceholders["appIcon"] = "@mipmap/ic_yellowowl" @@ -134,7 +142,7 @@ android { } create("aapsclient2") { applicationId = "info.nightscout.aapsclient2" - dimension = dim + dimension = "standard" resValue("string", "app_name", "AAPSClient2") versionName = Versions.appVersion + "-aapsclient" manifestPlaceholders["appIcon"] = "@mipmap/ic_blueowl" @@ -142,23 +150,29 @@ android { } } - dataBinding { //Deleting it causes a binding error - enable = true + useLibrary("org.apache.http.legacy") + + //Deleting it causes a binding error + dataBinding { enable } +} + +allprojects { + repositories { } } dependencies { + wearApp(project(":wear")) + // in order to use internet"s versions you"d need to enable Jetifier again // https://github.com/nightscout/graphview.git // https://github.com/nightscout/iconify.git - implementation(project(":app-wear-shared:shared")) - implementation(project(":app-wear-shared:shared-impl")) + implementation(project(":shared:impl")) implementation(project(":core:main")) - implementation(project(":core:graph")) implementation(project(":core:graphview")) implementation(project(":core:interfaces")) implementation(project(":core:libraries")) - implementation(project(":core:ns-sdk")) + implementation(project(":core:nssdk")) implementation(project(":core:utils")) implementation(project(":core:ui")) implementation(project(":core:validators")) @@ -187,7 +201,6 @@ dependencies { implementation(project(":insight")) implementation(project(":pump:medtronic")) implementation(project(":pump:pump-common")) - implementation(project(":pump:pump-core")) implementation(project(":pump:omnipod-common")) implementation(project(":pump:omnipod-eros")) implementation(project(":pump:omnipod-dash")) @@ -195,31 +208,31 @@ dependencies { implementation(project(":pump:virtual")) implementation(project(":workflow")) - testImplementation(project(":app-wear-shared:shared-tests")) + testImplementation(project(":shared:tests")) - //implementation fileTree(include = listOf("*.jar"), dir = "libs") +// implementation(fileTree (include: listOf("*.jar"), dir = "libs")) /* Dagger2 - We are going to use dagger.android which includes * support for Activity and fragment injection so we need to include * the following dependencies */ - kapt(Libs.Dagger.androidProcesssor) + kapt(Libs.Dagger.androidProcessor) kapt(Libs.Dagger.compiler) // MainApp api(Libs.Rx.rxDogTag) - } apply(from = "${project.rootDir}/core/main/test_dependencies.gradle") -println("--------------") +println("-------------------") println("isMaster: ${isMaster()}") println("gitAvailable: ${gitAvailable()}") println("allCommitted: ${allCommitted()}") -println("--------------") +println("-------------------") if (isMaster() && !gitAvailable()) { throw GradleException("GIT system is not available. On Windows try to run Android Studio as an Administrator. Check if GIT is installed and Studio have permissions to use it") } if (isMaster() && !allCommitted()) { throw GradleException("There are uncommitted changes. Clone sources again as described in wiki and do not allow gradle update") } + diff --git a/app/src/main/kotlin/app/aaps/MainActivity.kt b/app/src/main/kotlin/app/aaps/MainActivity.kt index 735d4699cf..b5296ab7c4 100644 --- a/app/src/main/kotlin/app/aaps/MainActivity.kt +++ b/app/src/main/kotlin/app/aaps/MainActivity.kt @@ -205,7 +205,7 @@ class MainActivity : DaggerAppCompatActivityWithResult() { } R.id.nav_about -> { - var message = "Build: ${BuildConfig.BUILDVERSION}\n" + var message = "Build: ${config.BUILD_VERSION}\n" message += "Flavor: ${BuildConfig.FLAVOR}${BuildConfig.BUILD_TYPE}\n" message += "${rh.gs(app.aaps.plugins.configuration.R.string.configbuilder_nightscoutversion_label)} ${activePlugin.activeNsClient?.detectedNsVersion() ?: rh.gs(app.aaps.plugins.main.R.string.not_available_full)}" if (config.isEngineeringMode()) message += "\n${rh.gs(app.aaps.plugins.configuration.R.string.engineering_mode_enabled)}" @@ -215,7 +215,7 @@ class MainActivity : DaggerAppCompatActivityWithResult() { val messageSpanned = SpannableString(message) Linkify.addLinks(messageSpanned, Linkify.WEB_URLS) MaterialAlertDialogBuilder(this@MainActivity, app.aaps.core.ui.R.style.DialogTheme) - .setTitle(rh.gs(R.string.app_name) + " " + BuildConfig.VERSION) + .setTitle(rh.gs(R.string.app_name) + " " + config.VERSION) .setIcon(iconsProvider.getIcon()) .setMessage(messageSpanned) .setPositiveButton(rh.gs(app.aaps.core.ui.R.string.ok), null) @@ -448,16 +448,16 @@ class MainActivity : DaggerAppCompatActivityWithResult() { if (!fabricPrivacy.fabricEnabled()) return val closedLoopEnabled = if (constraintChecker.isClosedLoopAllowed().value()) "CLOSED_LOOP_ENABLED" else "CLOSED_LOOP_DISABLED" // Size is limited to 36 chars - val remote = BuildConfig.REMOTE.lowercase(Locale.getDefault()) + val remote = config.REMOTE.lowercase(Locale.getDefault()) .replace("https://", "") .replace("http://", "") .replace(".git", "") .replace(".com/", ":") .replace(".org/", ":") .replace(".net/", ":") - fabricPrivacy.firebaseAnalytics.setUserProperty("Mode", BuildConfig.APPLICATION_ID + "-" + closedLoopEnabled) + fabricPrivacy.firebaseAnalytics.setUserProperty("Mode", config.APPLICATION_ID + "-" + closedLoopEnabled) fabricPrivacy.firebaseAnalytics.setUserProperty("Language", sp.getString(app.aaps.core.ui.R.string.key_language, Locale.getDefault().language)) - fabricPrivacy.firebaseAnalytics.setUserProperty("Version", BuildConfig.VERSION) + fabricPrivacy.firebaseAnalytics.setUserProperty("Version", config.VERSION_NAME) fabricPrivacy.firebaseAnalytics.setUserProperty("HEAD", BuildConfig.HEAD) fabricPrivacy.firebaseAnalytics.setUserProperty("Remote", remote) val hashes: List = signatureVerifierPlugin.shortHashes() @@ -471,9 +471,9 @@ class MainActivity : DaggerAppCompatActivityWithResult() { activePlugin.activeInsulin.let { fabricPrivacy.firebaseAnalytics.setUserProperty("Insulin", it::class.java.simpleName) } // Add to crash log too FirebaseCrashlytics.getInstance().setCustomKey("HEAD", BuildConfig.HEAD) - FirebaseCrashlytics.getInstance().setCustomKey("Version", BuildConfig.VERSION) - FirebaseCrashlytics.getInstance().setCustomKey("BuildType", BuildConfig.BUILD_TYPE) - FirebaseCrashlytics.getInstance().setCustomKey("BuildFlavor", BuildConfig.FLAVOR) + FirebaseCrashlytics.getInstance().setCustomKey("Version", config.VERSION_NAME) + FirebaseCrashlytics.getInstance().setCustomKey("BuildType", config.BUILD_TYPE) + FirebaseCrashlytics.getInstance().setCustomKey("BuildFlavor", config.FLAVOR) FirebaseCrashlytics.getInstance().setCustomKey("Remote", remote) FirebaseCrashlytics.getInstance().setCustomKey("Committed", BuildConfig.COMMITTED) FirebaseCrashlytics.getInstance().setCustomKey("Hash", hashes[0]) diff --git a/app/src/main/kotlin/app/aaps/MainApp.kt b/app/src/main/kotlin/app/aaps/MainApp.kt index ec13f49f43..ae14a5a51e 100644 --- a/app/src/main/kotlin/app/aaps/MainApp.kt +++ b/app/src/main/kotlin/app/aaps/MainApp.kt @@ -100,7 +100,7 @@ class MainApp : DaggerApplication() { setRxErrorHandler() LocaleHelper.update(this@MainApp) - var gitRemote: String? = BuildConfig.REMOTE + var gitRemote: String? = config.REMOTE var commitHash: String? = BuildConfig.HEAD if (gitRemote?.contains("NoGitSystemAvailable") == true) { gitRemote = null @@ -109,9 +109,9 @@ class MainApp : DaggerApplication() { disposable += compatDBHelper.dbChangeDisposable() registerActivityLifecycleCallbacks(activityMonitor) runOnUiThread { themeSwitcherPlugin.setThemeMode() } - aapsLogger.debug("Version: " + BuildConfig.VERSION_NAME) - aapsLogger.debug("BuildVersion: " + BuildConfig.BUILDVERSION) - aapsLogger.debug("Remote: " + BuildConfig.REMOTE) + aapsLogger.debug("Version: " + config.VERSION_NAME) + aapsLogger.debug("BuildVersion: " + config.BUILD_VERSION) + aapsLogger.debug("Remote: " + config.REMOTE) registerLocalBroadcastReceiver() // trigger here to see the new version on app start after an update @@ -128,7 +128,7 @@ class MainApp : DaggerApplication() { if (config.isDev() && sp.getStringOrNull(app.aaps.core.utils.R.string.key_email_for_crash_report, null).isNullOrBlank()) notificationStore.add(Notification(Notification.IDENTIFICATION_NOT_SET, rh.get().gs(R.string.identification_not_set), Notification.INFO)) // log version - disposable += repository.runTransaction(VersionChangeTransaction(BuildConfig.VERSION_NAME, BuildConfig.VERSION_CODE, gitRemote, commitHash)).subscribe() + disposable += repository.runTransaction(VersionChangeTransaction(config.VERSION_NAME, BuildConfig.VERSION_CODE, gitRemote, commitHash)).subscribe() // log app start if (sp.getBoolean(app.aaps.plugins.sync.R.string.key_ns_log_app_started_event, config.APS)) disposable += repository diff --git a/app/src/main/kotlin/app/aaps/implementations/ConfigImpl.kt b/app/src/main/kotlin/app/aaps/implementations/ConfigImpl.kt index 7102b9ab80..4d0f1cbc1e 100644 --- a/app/src/main/kotlin/app/aaps/implementations/ConfigImpl.kt +++ b/app/src/main/kotlin/app/aaps/implementations/ConfigImpl.kt @@ -47,8 +47,8 @@ class ConfigImpl @Inject constructor( engineeringMode = engineeringModeSemaphore.exists() && engineeringModeSemaphore.isFile unfinishedMode = unfinishedModeSemaphore.exists() && unfinishedModeSemaphore.isFile - devBranch = BuildConfig.VERSION.contains("-") || BuildConfig.VERSION.matches(Regex(".*[a-zA-Z]+.*")) - if (BuildConfig.VERSION.contains("-beta") || BuildConfig.VERSION.contains("-rc")) + devBranch = VERSION.contains("-") || VERSION.matches(Regex(".*[a-zA-Z]+.*")) + if (VERSION.contains("-beta") || VERSION.contains("-rc")) devBranch = false } diff --git a/build.gradle.kts b/build.gradle.kts index 81b1523444..11d67c79fe 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -60,7 +60,7 @@ buildscript { mavenCentral() } dependencies { - classpath("com.android.tools.build:gradle:8.1.1") + classpath("com.android.tools.build:gradle:8.1.2") classpath("com.google.gms:google-services:4.4.0") classpath("com.google.firebase:firebase-crashlytics-gradle:2.9.9") diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index a5e777638f..09f425e9d0 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -1,6 +1,6 @@ object Versions { - const val appVersion = "3.2.0-dev-k" + const val appVersion = "3.2.0-dev-m" const val versionCode = 1500 const val ndkVersion = "21.1.6352462" diff --git a/core/libraries/build.gradle b/core/libraries/build.gradle.kts similarity index 75% rename from core/libraries/build.gradle rename to core/libraries/build.gradle.kts index 14c29c3764..6a9a29cd50 100644 --- a/core/libraries/build.gradle +++ b/core/libraries/build.gradle.kts @@ -1,4 +1,4 @@ // in order to use internet's versions you'd need to enable Jetifier again // https://github.com/nightscout/iconify.git configurations.create("default") -artifacts.add("default", file('libs/iconify.aar')) \ No newline at end of file +artifacts.add("default", file("libs/iconify.aar")) \ No newline at end of file