Skip to content

Commit e21092d

Browse files
authored
Merge pull request #146 from MobileFirstLLC/update-to-latest-android
Updated Android to Google required targets. Updated manifest and Sett…
2 parents 0b8288a + a748846 commit e21092d

5 files changed

Lines changed: 38 additions & 29 deletions

File tree

base/build.gradle

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ apply plugin: 'kotlin-android'
55
apply plugin: 'kotlin-kapt'
66

77
android {
8-
compileSdkVersion 30
9-
buildToolsVersion "30.0.3"
8+
compileSdk 34
109
buildFeatures.viewBinding = true
1110
defaultConfig {
1211
applicationId "mf.asciitext.lite"
13-
minSdkVersion 14
14-
targetSdkVersion 30
12+
minSdk 30
13+
targetSdk 34
1514
versionCode 16
1615
versionName "2.6.1"
1716
vectorDrawables.useSupportLibrary = true
@@ -20,10 +19,6 @@ android {
2019
resValue "string", "feedbackUri", "https://mobilefirst.me/feedback?appId=irregular-expressions&os=android&version=" + versionName
2120
resValue "string", "rateUri", "https://play.google.com/store/apps/details?id=" + applicationId
2221
}
23-
lintOptions {
24-
checkReleaseBuilds true
25-
abortOnError true
26-
}
2722
buildTypes {
2823
debug {
2924
dependencies {
@@ -43,18 +38,24 @@ android {
4338
sourceCompatibility JavaVersion.VERSION_1_8
4439
targetCompatibility JavaVersion.VERSION_1_8
4540
}
41+
namespace 'mf.irregex'
42+
lint {
43+
abortOnError true
44+
checkReleaseBuilds true
45+
}
46+
buildToolsVersion '34.0.0'
4647
}
4748

4849
dependencies {
4950
implementation fileTree(dir: 'libs', include: ['*.jar'])
5051
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
51-
implementation 'androidx.appcompat:appcompat:1.4.1'
52-
implementation 'androidx.core:core-ktx:1.7.0'
53-
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
52+
implementation 'androidx.appcompat:appcompat:1.6.1'
53+
implementation 'androidx.core:core-ktx:1.12.0'
54+
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
5455
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
55-
implementation 'com.google.android.material:material:1.5.0'
56+
implementation 'com.google.android.material:material:1.11.0'
5657
implementation "androidx.cardview:cardview:1.0.0"
5758
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
58-
implementation 'androidx.recyclerview:recyclerview:1.2.1'
59-
implementation 'androidx.preference:preference-ktx:1.2.0'
59+
implementation 'androidx.recyclerview:recyclerview:1.3.2'
60+
implementation 'androidx.preference:preference-ktx:1.2.1'
6061
}

base/src/main/AndroidManifest.xml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:dist="http://schemas.android.com/apk/distribution"
4-
package="mf.irregex">
3+
xmlns:dist="http://schemas.android.com/apk/distribution">
54

65
<uses-permission android:name="android.permission.VIBRATE"/>
76
<dist:module dist:instant="true" />
@@ -18,7 +17,8 @@
1817
android:theme="@style/AppTheme">
1918
<activity
2019
android:name="mf.irregex.SplashScreen"
21-
android:theme="@style/SplashTheme">
20+
android:theme="@style/SplashTheme"
21+
android:exported="true">
2222
<intent-filter>
2323
<action android:name="android.intent.action.MAIN" />
2424

@@ -27,7 +27,8 @@
2727
</activity>
2828
<activity
2929
android:name="mf.irregex.MainActivity"
30-
android:windowSoftInputMode="adjustPan">
30+
android:windowSoftInputMode="adjustPan"
31+
android:exported="true">
3132
<intent-filter>
3233
<action android:name="android.intent.action.VIEW" />
3334
</intent-filter>
@@ -40,7 +41,8 @@
4041
android:theme="@style/AppToolbarTheme" />
4142

4243
<service android:name="mf.irregex.keyboard.MyInputMethodService"
43-
android:permission="android.permission.BIND_INPUT_METHOD">
44+
android:permission="android.permission.BIND_INPUT_METHOD"
45+
android:exported="true">
4446
<intent-filter>
4547
<action android:name="android.view.InputMethod" />
4648
</intent-filter>

base/src/main/java/mf/irregex/settings/SettingsActivity.kt

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,19 @@ class SettingsActivity : AppCompatActivity(),
6464
// Instantiate the new Fragment
6565
val args = pref.extras
6666
val fragment =
67-
supportFragmentManager.fragmentFactory.instantiate(classLoader, pref.fragment)
68-
fragment.arguments = args
69-
fragment.setTargetFragment(caller, 0)
70-
supportFragmentManager.beginTransaction()
71-
.add(android.R.id.content, fragment)
72-
.addToBackStack(null)
73-
.commit()
67+
pref.fragment?.let {
68+
supportFragmentManager.fragmentFactory.instantiate(classLoader,
69+
it
70+
)
71+
}
72+
fragment?.arguments = args
73+
fragment?.setTargetFragment(caller, 0)
74+
fragment?.let {
75+
supportFragmentManager.beginTransaction()
76+
.add(android.R.id.content, it)
77+
.addToBackStack(null)
78+
.commit()
79+
}
7480
title = pref.title
7581
return true
7682
}

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.5.31'
4+
ext.kotlin_version = '1.9.22'
55
repositories {
66
google()
77
mavenCentral()
88

99
}
1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:7.1.1'
11+
classpath 'com.android.tools.build:gradle:7.4.2'
1212
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1313
}
1414
}

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip

0 commit comments

Comments
 (0)