Skip to content

Commit

Permalink
Migrate to API 13 (Android 12)
Browse files Browse the repository at this point in the history
Upgrade test dependencies
  • Loading branch information
ndegwamartin committed Jul 25, 2024
1 parent 388f94e commit 763a74d
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 20 deletions.
13 changes: 6 additions & 7 deletions configs.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,16 @@ ext {

// Dependency and other versions
androidxTestCoreVersion = "1.4.0"
buildToolsVersion = "30.0.3"
compileSdkVersion = 30
jacocoVersion = "0.8.8"
junitVersion = "4.12"
compileSdkVersion = 34
jacocoVersion = "0.8.11"
junitVersion = "4.13.2"
mapboxAnnotationPluginVersion = "0.9.0"
mapboxSdkVersion = "9.7.1"
robolectricShadowsMultidexVersion = "4.7.3"
robolectricVersion = "4.7.3"
robolectricShadowsMultidexVersion = "4.13"
robolectricVersion = "4.13"
supportVersion = "1.0.0"
volleyVersion = "1.2.0"
targetSdkVersion = 27
targetSdkVersion = 34

// Dependency names
androidxTestCore = "androidx.test:core:$androidxTestCoreVersion"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ POM_SETTING_DEVELOPER_NAME=OpenSRP Onadev
android.useAndroidX=true
android.enableJetifier=true

android.jetifier.ignorelist=shadows,bcprov-jdk15on
android.jetifier.ignorelist=shadows,bcprov-jdk18on
#android.jetifier.blacklist=shadows,bcprov-jdk15on

# android.debug.obsoleteApi=true
Expand Down
12 changes: 7 additions & 5 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ jacoco {

android {

compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdk rootProject.ext.compileSdkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down Expand Up @@ -146,12 +145,15 @@ private static void testDependencies(instance, configuration) {
configuration.testImplementation instance.robolectric
configuration.testImplementation instance.robolectricShadowsMultidex

configuration.testImplementation 'org.mockito:mockito-inline:2.25.0'
configuration.testImplementation 'org.mockito:mockito-inline:5.2.0'

configuration.testImplementation instance.androidxTestCore
configuration.androidTestImplementation instance.junit
configuration.androidTestImplementation 'org.mockito:mockito-android:2.7.22'
configuration.androidTestImplementation 'org.mockito:mockito-core:2.7.22'

def mockitoVersion = '5.12.0'

configuration.androidTestImplementation "org.mockito:mockito-android:$mockitoVersion"
configuration.androidTestImplementation "org.mockito:mockito-core:$mockitoVersion"
configuration.androidTestImplementation ('com.android.support.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'net.sf.kxml', module: 'kxml2'
Expand Down
3 changes: 2 additions & 1 deletion library/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package="io.ona.kujaku">

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
Expand All @@ -24,7 +25,7 @@
<service android:name=".services.TrackingService"
android:label="Tracking Service">
</service>
<receiver android:name=".receivers.KujakuNetworkChangeReceiver">
<receiver android:name=".receivers.KujakuNetworkChangeReceiver" android:exported="true">
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
<action android:name="android.net.wifi.WIFI_STATE_CHANGED"/>
Expand Down
3 changes: 1 addition & 2 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ jacoco {

android {

compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdk rootProject.ext.compileSdkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down
5 changes: 3 additions & 2 deletions sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
<activity
android:name=".activities.MainActivity"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden">
android:windowSoftInputMode="stateAlwaysHidden"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down Expand Up @@ -108,4 +109,4 @@
</activity>
</application>

</manifest>
</manifest>
3 changes: 1 addition & 2 deletions utils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ jacoco {

android {

compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdk rootProject.ext.compileSdkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down

0 comments on commit 763a74d

Please sign in to comment.