Skip to content

Commit 849d946

Browse files
authored
Merge pull request #20 from devmike01/fix/AndroidX
Upgrade to AndroidX & Fixes
2 parents b9890b7 + 6877675 commit 849d946

File tree

18 files changed

+73
-80
lines changed

18 files changed

+73
-80
lines changed

.idea/misc.xml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/sonarlint/issuestore/index.pb

Whitespace-only changes.

.idea/sonarlint/securityhotspotstore/index.pb

Whitespace-only changes.

app/build.gradle

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 26
4+
compileSdk 33
55
defaultConfig {
66
applicationId "com.devs.vectorchildfinderdemo"
77
minSdkVersion 16
8-
targetSdkVersion 26
8+
targetSdkVersion 33
99
versionCode 1
1010
versionName "1.0"
11-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
11+
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
1212
vectorDrawables.useSupportLibrary = true
1313
}
1414
buildTypes {
@@ -17,17 +17,18 @@ android {
1717
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
1818
}
1919
}
20+
namespace 'com.devs.vectorchildfinderdemo'
2021
}
2122

2223
dependencies {
2324
implementation fileTree(dir: 'libs', include: ['*.jar'])
24-
implementation 'com.android.support:appcompat-v7:26.1.0'
25-
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
26-
testImplementation 'junit:junit:4.12'
27-
androidTestImplementation 'com.android.support.test:runner:1.0.1'
28-
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
25+
implementation 'androidx.appcompat:appcompat:1.6.1'
26+
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
27+
testImplementation 'junit:junit:4.13.2'
28+
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
29+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
2930

30-
compile project(':vectorchildfinder')
31+
implementation project(':vectorchildfinder')
3132
//compile 'com.github.devsideal:VectorChildFinder:1.0.0'
3233

3334
}

app/src/androidTest/java/com/devs/vectorchildfinderdemo/ExampleInstrumentedTest.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
package com.devs.vectorchildfinderdemo;
22

3+
import static org.junit.Assert.assertEquals;
4+
35
import android.content.Context;
4-
import android.support.test.InstrumentationRegistry;
5-
import android.support.test.runner.AndroidJUnit4;
6+
7+
import androidx.test.ext.junit.runners.AndroidJUnit4;
8+
import androidx.test.platform.app.InstrumentationRegistry;
69

710
import org.junit.Test;
811
import org.junit.runner.RunWith;
912

10-
import static org.junit.Assert.*;
11-
1213
/**
1314
* Instrumented test, which will execute on an Android device.
1415
*

app/src/main/AndroidManifest.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="com.devs.vectorchildfinderdemo">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<application
65
android:allowBackup="true"
@@ -9,7 +8,9 @@
98
android:roundIcon="@mipmap/ic_launcher_round"
109
android:supportsRtl="true"
1110
android:theme="@style/AppTheme">
12-
<activity android:name=".MainActivity">
11+
<activity
12+
android:exported="true"
13+
android:name=".MainActivity">
1314
<intent-filter>
1415
<action android:name="android.intent.action.MAIN" />
1516

app/src/main/java/com/devs/vectorchildfinderdemo/MainActivity.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
11
package com.devs.vectorchildfinderdemo;
22

3-
import android.graphics.Color;
4-
import android.support.v7.app.AppCompatActivity;
53
import android.os.Bundle;
64
import android.view.View;
75
import android.widget.ImageView;
8-
import android.widget.Toast;
6+
7+
import androidx.appcompat.app.AppCompatActivity;
98

109
import com.devs.vectorchildfinder.VectorChildFinder;
1110
import com.devs.vectorchildfinder.VectorDrawableCompat;
1211
//import android.support.graphics.drawable.VectorDrawableCompat;
1312

14-
import java.util.ArrayList;
15-
import java.util.Arrays;
16-
import java.util.Collections;
17-
import java.util.Comparator;
18-
import java.util.List;
1913

2014
public class MainActivity extends AppCompatActivity {
2115

app/src/main/res/layout/activity_main.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto"
4-
xmlns:tools="http://schemas.android.com/tools"
54
android:id="@+id/relativeLayout"
65
android:layout_width="match_parent"
76
android:layout_height="match_parent">
@@ -125,4 +124,4 @@
125124
app:layout_constraintStart_toStartOf="parent" />
126125

127126

128-
</android.support.constraint.ConstraintLayout>
127+
</androidx.constraintlayout.widget.ConstraintLayout>

app/src/test/java/com/devs/vectorchildfinderdemo/ExampleUnitTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.devs.vectorchildfinderdemo;
22

3-
import org.junit.Test;
3+
import static org.junit.Assert.assertEquals;
44

5-
import static org.junit.Assert.*;
5+
import org.junit.Test;
66

77
/**
88
* Example local unit test, which will execute on the development machine (host).

build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ buildscript {
44

55
repositories {
66
google()
7-
jcenter()
7+
mavenCentral()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:3.0.0'
11-
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
10+
classpath 'com.android.tools.build:gradle:8.0.2'
11+
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
1212

1313
// NOTE: Do not place your application dependencies here; they belong
1414
// in the individual module build.gradle files
@@ -18,11 +18,11 @@ buildscript {
1818
allprojects {
1919
repositories {
2020
google()
21-
jcenter()
21+
mavenCentral()
2222
maven { url 'https://jitpack.io' }
2323
}
2424
}
2525

26-
task clean(type: Delete) {
26+
tasks.register('clean', Delete) {
2727
delete rootProject.buildDir
2828
}

0 commit comments

Comments
 (0)