From daf920c163616930c09c672d0e39482b05969842 Mon Sep 17 00:00:00 2001 From: Nicolas Ferrario Date: Sat, 14 Jan 2023 12:06:26 +0300 Subject: [PATCH] Update dependencies; Croatia now uses EUR --- .github/workflows/android.yml | 4 ++-- PRIVACY_POLICY.md | 3 +++ app/build.gradle | 13 +++++++------ app/src/main/AndroidManifest.xml | 11 +++++------ app/src/main/assets/data.sql | 2 +- .../com/feniworks/countrycodenew/DataBaseHelper.kt | 4 +++- .../com/feniworks/countrycodenew/MainActivity.kt | 2 +- build.gradle | 8 ++++---- gradle/wrapper/gradle-wrapper.properties | 6 +++--- 9 files changed, 29 insertions(+), 24 deletions(-) create mode 100644 PRIVACY_POLICY.md diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index bd7fede..028667d 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -13,10 +13,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: set up JDK 1.8 + - name: set up JDK 11 uses: actions/setup-java@v1 with: - java-version: 1.8 + java-version: 11 - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build with Gradle diff --git a/PRIVACY_POLICY.md b/PRIVACY_POLICY.md new file mode 100644 index 0000000..46d9e7c --- /dev/null +++ b/PRIVACY_POLICY.md @@ -0,0 +1,3 @@ +This application does not collect or store personal data. + +If you installed this application from Google Play, then Google Play does collect some personal data. Please see the privacy policy for Google Play Services here: https://policies.google.com/privacy \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index a21d55a..60a8e3e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,14 +3,14 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' android { - compileSdkVersion 30 + compileSdkVersion 33 buildToolsVersion "30.0.3" defaultConfig { applicationId "com.feniworks.countrycodenew" minSdkVersion 15 - targetSdkVersion 30 - versionCode 2232 - versionName "2.3.0" + targetSdkVersion 33 + versionCode 2400 + versionName '2.4.0' } buildTypes { release { @@ -23,13 +23,14 @@ android { buildFeatures { viewBinding true } + namespace 'com.feniworks.countrycodenew' } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.21' + implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0' - def lifecycle_version = "2.2.0" + def lifecycle_version = "2.5.1" implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version" } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 5871871..509f5af 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - + + android:theme="@style/SplashTheme" + android:exported="true"> @@ -19,8 +18,8 @@ + android:launchMode="singleTop" + android:exported="true"> diff --git a/app/src/main/assets/data.sql b/app/src/main/assets/data.sql index 386811f..347e38e 100644 --- a/app/src/main/assets/data.sql +++ b/app/src/main/assets/data.sql @@ -60,7 +60,7 @@ INSERT INTO countries ("code", "name", "capital", "currency", "iso2", "timezone" INSERT INTO countries ("code", "name", "capital", "currency", "iso2", "timezone") VALUES ('242', 'Congo', 'Brazzaville', 'XAF', 'CG', '+01:00'); INSERT INTO countries ("code", "name", "capital", "currency", "iso2", "timezone") VALUES ('682', 'Cook Islands', 'Avarua', 'NZD', 'CK', '-10:00'); INSERT INTO countries ("code", "name", "capital", "currency", "iso2", "timezone") VALUES ('506', 'Costa Rica', 'San Jose', 'CRC', 'CR', '-06:00'); -INSERT INTO countries ("code", "name", "capital", "currency", "iso2", "timezone") VALUES ('385', 'Croatia', 'Zagreb', 'HRK', 'HR', '+01:00'); +INSERT INTO countries ("code", "name", "capital", "currency", "iso2", "timezone") VALUES ('385', 'Croatia', 'Zagreb', 'EUR', 'HR', '+01:00'); INSERT INTO countries ("code", "name", "capital", "currency", "iso2", "timezone") VALUES ('53', 'Cuba', 'Havana', 'CUP', 'CU', '-05:00'); INSERT INTO countries ("code", "name", "capital", "currency", "iso2", "timezone") VALUES ('599', 'CuraƧao', 'Willemstad', 'ANG', 'CW', '-04:00'); INSERT INTO countries ("code", "name", "capital", "currency", "iso2", "timezone") VALUES ('357', 'Cyprus', 'Nicosia', 'EUR', 'CY', '+02:00'); diff --git a/app/src/main/java/com/feniworks/countrycodenew/DataBaseHelper.kt b/app/src/main/java/com/feniworks/countrycodenew/DataBaseHelper.kt index c736527..22a5716 100644 --- a/app/src/main/java/com/feniworks/countrycodenew/DataBaseHelper.kt +++ b/app/src/main/java/com/feniworks/countrycodenew/DataBaseHelper.kt @@ -1,5 +1,6 @@ package com.feniworks.countrycodenew +import android.annotation.SuppressLint import android.content.Context import android.database.sqlite.SQLiteDatabase import android.database.sqlite.SQLiteOpenHelper @@ -31,6 +32,7 @@ class DataBaseHelper internal constructor(private val context: Context) : SQLite onCreate(db) } + @SuppressLint("Range") fun findCountry(countryId: String): ArrayList { val data = ArrayList() val cursor = db.rawQuery("SELECT * FROM countries WHERE id = $countryId", null) @@ -81,7 +83,7 @@ class DataBaseHelper internal constructor(private val context: Context) : SQLite companion object { private const val DB_NAME = "data" - private const val DATABASE_VERSION = 8 + private const val DATABASE_VERSION = 9 } } diff --git a/app/src/main/java/com/feniworks/countrycodenew/MainActivity.kt b/app/src/main/java/com/feniworks/countrycodenew/MainActivity.kt index e956bd4..79e7849 100644 --- a/app/src/main/java/com/feniworks/countrycodenew/MainActivity.kt +++ b/app/src/main/java/com/feniworks/countrycodenew/MainActivity.kt @@ -110,7 +110,7 @@ class MainActivity : Activity() { R.id.action_about -> { val msg = Html.fromHtml(""" Developed by Feniworks
-Version ${BuildConfig.VERSION_NAME} (2021-01-31)

+Version ${BuildConfig.VERSION_NAME} (2023-01-14)

If you like this application, please rate it with 5 stars in the Play Store :)

Icons courtesy of flagpedia.net

diff --git a/build.gradle b/build.gradle index 31d16aa..8e0eaf5 100644 --- a/build.gradle +++ b/build.gradle @@ -1,11 +1,11 @@ buildscript { - ext.kotlin_version = '1.4.21' + ext.kotlin_version = '1.7.20' repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:4.1.2' + classpath 'com.android.tools.build:gradle:7.3.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -13,7 +13,7 @@ buildscript { allprojects { repositories { google() - jcenter() + mavenCentral() } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index dc5491e..0de7151 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Jan 27 21:40:05 ART 2021 +#Sat Jan 14 11:38:49 TRT 2023 distributionBase=GRADLE_USER_HOME +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip +zipStoreBase=GRADLE_USER_HOME