From 4330421ac842b33dabc72ff3b53c0703cf6558ab Mon Sep 17 00:00:00 2001 From: hmalik144 Date: Sun, 17 May 2020 18:36:52 +0100 Subject: [PATCH] key removed from gradle properties --- .idea/caches/build_file_checksums.ser | Bin 537 -> 537 bytes .idea/codeStyles/Project.xml | 6 ++++++ app/build.gradle | 12 ------------ .../network/interceptors/QueryInterceptor.kt | 2 +- .../h_mal/easycc/ui/main/MainViewModel.kt | 2 -- gradle.properties | 10 ++++------ 6 files changed, 11 insertions(+), 21 deletions(-) diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index 9290a046bff32622e97793788abaf9ca12ffa465..08990322edddc642871953ce5ac88e89a4720365 100644 GIT binary patch delta 73 zcmV-P0Ji^`1epYonFF-&Es>me5WblAg=}+bt4iH>7zQw$8zm(Ren!iL<5(w3pU(sM=(Bsvsew delta 73 zcmV-P0Ji^`1epYonFEdt#F3nL5Nn9=aN8ni8lJ3>#V0^EFOwqyau7DaP)am$*)-9} fxjG1@+!~Xm0b>!cy^yieF7GBWarZTSe@N + + + + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 51314b8..b0436be 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -19,23 +19,11 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } -// testOptions { -// unitTests.returnDefaultValues = true -// } dataBinding { enabled = true } viewBinding.enabled = true - - buildTypes.each { - Properties properties = new Properties() - properties.load(project.rootProject.file("local.properties").newDataInputStream()) - def ccApiKey = properties.getProperty("cc_api_key", "") - - it.buildConfigField 'String', "CC_API_KEY", ccApiKey - it.resValue 'string', "api_key", ccApiKey - } } dependencies { diff --git a/app/src/main/java/com/appttude/h_mal/easycc/data/network/interceptors/QueryInterceptor.kt b/app/src/main/java/com/appttude/h_mal/easycc/data/network/interceptors/QueryInterceptor.kt index 9f61b41..19f13f0 100644 --- a/app/src/main/java/com/appttude/h_mal/easycc/data/network/interceptors/QueryInterceptor.kt +++ b/app/src/main/java/com/appttude/h_mal/easycc/data/network/interceptors/QueryInterceptor.kt @@ -17,7 +17,7 @@ class QueryInterceptor() : Interceptor { val originalHttpUrl: HttpUrl = original.url() val url = originalHttpUrl.newBuilder() - .addQueryParameter("apiKey", BuildConfig.CC_API_KEY) + .addQueryParameter("apiKey", "a4f93cc2ff05dd772321") .build() // Add amended Url back to request diff --git a/app/src/main/java/com/appttude/h_mal/easycc/ui/main/MainViewModel.kt b/app/src/main/java/com/appttude/h_mal/easycc/ui/main/MainViewModel.kt index 19778f1..ad99ad6 100644 --- a/app/src/main/java/com/appttude/h_mal/easycc/ui/main/MainViewModel.kt +++ b/app/src/main/java/com/appttude/h_mal/easycc/ui/main/MainViewModel.kt @@ -78,7 +78,6 @@ class MainViewModel( val bottomVal1 = (fromValDouble * conversionRate) bottomVal1.toTwoDpString() }catch (e: NumberFormatException) { - Log.e(TAG, "no numbers inserted") null } } @@ -89,7 +88,6 @@ class MainViewModel( val newTopVal = toDoubleVal.times((1/conversionRate)) newTopVal.toTwoDpString() } catch (e: NumberFormatException) { - Log.e(TAG, "no numbers inserted") null } } diff --git a/gradle.properties b/gradle.properties index 9e6fce1..4a5855f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,19 +1,17 @@ # Project-wide Gradle settings. - # IDE (e.g. Android Studio) users: # Gradle settings configured through the IDE *will override* # any settings specified in this file. - # For more details on how to configure your build environment visit # http://www.gradle.org/docs/current/userguide/build_environment.html - # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. -android.enableJetifier=true -android.useAndroidX=true org.gradle.jvmargs=-Xmx1536m - # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true +# Kotlin code style for this project: "official" or "obsolete": +kotlin.code.style=official +android.useAndroidX=true +android.enableJetifier=true \ No newline at end of file