Skip to content

Commit e7737b4

Browse files
AndroidX compatibility #159
1 parent 599702c commit e7737b4

File tree

16 files changed

+104
-71
lines changed

16 files changed

+104
-71
lines changed

demo/package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,25 @@
66
"nativescript": {
77
"id": "org.nativescript.plugindemo.localnotifications",
88
"tns-ios": {
9-
"version": "5.2.0"
9+
"version": "6.0.0-rc-2019-06-28-105002-01"
1010
},
1111
"tns-android": {
12-
"version": "5.2.0"
12+
"version": "6.0.0-rc-2019-06-27-172817-03"
1313
}
1414
},
1515
"dependencies": {
1616
"nativescript-local-notifications": "file:../src",
1717
"nativescript-theme-core": "~1.0.4",
18-
"tns-core-modules": "~5.2.0"
18+
"tns-core-modules": "6.0.0-rc-2019-06-28-175837-02"
1919
},
2020
"devDependencies": {
2121
"babel-traverse": "6.26.0",
2222
"babel-types": "6.26.0",
2323
"babylon": "6.18.0",
2424
"lazy": "1.0.11",
25-
"nativescript-dev-typescript": "~0.7.9",
26-
"nativescript-dev-webpack": "~0.19.2",
27-
"tns-platform-declarations": "~5.2.0",
28-
"typescript": "~2.8.4"
25+
"nativescript-dev-webpack": "1.0.0-rc-2019-07-02-161545-02",
26+
"tns-platform-declarations": "6.0.0-rc-2019-06-28-175837-02",
27+
"typescript": "3.4.1"
2928
},
3029
"scripts": {
3130
"build.plugin": "cd ../src && npm run build"

native-src/android/android.iml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@
1212
<exclude-output />
1313
<content url="file://$MODULE_DIR$">
1414
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
15-
<excludeFolder url="file://$MODULE_DIR$/build" />
1615
</content>
17-
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
16+
<orderEntry type="inheritedJdk" />
1817
<orderEntry type="sourceFolder" forTests="false" />
1918
</component>
2019
</module>

native-src/android/app/app.iml

Lines changed: 61 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,28 @@
1717
<option name="ALLOW_USER_CONFIGURATION" value="false" />
1818
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
1919
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
20-
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
20+
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res;file://$MODULE_DIR$/build/generated/res/resValues/debug" />
21+
<option name="TEST_RES_FOLDERS_RELATIVE_PATH" value="" />
2122
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
2223
<option name="PROJECT_TYPE" value="1" />
2324
</configuration>
2425
</facet>
2526
</component>
2627
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7">
27-
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
28-
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
28+
<output url="file://$MODULE_DIR$/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes" />
29+
<output-test url="file://$MODULE_DIR$/build/intermediates/javac/debugUnitTest/compileDebugUnitTestJavaWithJavac/classes" />
2930
<exclude-output />
3031
<content url="file://$MODULE_DIR$">
3132
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/debug" isTestSource="false" generated="true" />
32-
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
33+
<sourceFolder url="file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debug/compileDebugAidl/out" isTestSource="false" generated="true" />
3334
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
34-
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
35+
<sourceFolder url="file://$MODULE_DIR$/build/generated/renderscript_source_output_dir/debug/compileDebugRenderscript/out" isTestSource="false" generated="true" />
3536
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
3637
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" />
3738
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
38-
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
39+
<sourceFolder url="file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debugAndroidTest/compileDebugAndroidTestAidl/out" isTestSource="true" generated="true" />
3940
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
40-
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
41+
<sourceFolder url="file://$MODULE_DIR$/build/generated/renderscript_source_output_dir/debugAndroidTest/compileDebugAndroidTestRenderscript/out" isTestSource="true" generated="true" />
4142
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
4243
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" />
4344
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/test/debug" isTestSource="true" generated="true" />
@@ -85,37 +86,72 @@
8586
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
8687
<excludeFolder url="file://$MODULE_DIR$/build/generated/not_namespaced_r_class_sources" />
8788
<excludeFolder url="file://$MODULE_DIR$/build/generated/source/r" />
88-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotations" />
89+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/aapt_friendly_merged_manifests" />
90+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotation_processor_list" />
91+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotations_typedef_file" />
92+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotations_zip" />
8993
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/attr" />
9094
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
9195
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
9296
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/check-manifest" />
93-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
97+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/check_manifest_result" />
98+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/compile_only_not_namespaced_r_class_jar" />
99+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/consumer_proguard_file" />
94100
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
95-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/intermediate-jars" />
96-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaPrecompile" />
97-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
101+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javac" />
102+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/library_and_local_jars_jni" />
103+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/library_assets" />
104+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/library_java_res" />
105+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/library_manifest" />
106+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint_jar" />
107+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint_publish_jar" />
98108
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
109+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_jni_libs" />
110+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_manifests" />
111+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_shaders" />
112+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/packaged-classes" />
113+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/packaged_res" />
114+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/public_res" />
99115
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
100116
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
101-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
117+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shader_assets" />
118+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
119+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/tmp" />
102120
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
103-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/typedefs.txt" />
104121
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
105122
<excludeFolder url="file://$MODULE_DIR$/build/reports" />
106123
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
107124
</content>
108-
<orderEntry type="jdk" jdkName="Android API 26 Platform" jdkType="Android SDK" />
125+
<orderEntry type="jdk" jdkName="Android API 28 Platform" jdkType="Android SDK" />
109126
<orderEntry type="sourceFolder" forTests="false" />
110-
<orderEntry type="library" name="Gradle: android.arch.lifecycle:runtime:1.0.0@aar" level="project" />
111-
<orderEntry type="library" name="Gradle: com.android.support:support-fragment:26.1.0@aar" level="project" />
112-
<orderEntry type="library" name="Gradle: android.arch.lifecycle:common:1.0.0@jar" level="project" />
113-
<orderEntry type="library" name="Gradle: com.android.support:support-core-utils:26.1.0@aar" level="project" />
114-
<orderEntry type="library" name="Gradle: android.arch.core:common:1.0.0@jar" level="project" />
115-
<orderEntry type="library" name="Gradle: com.android.support:support-v4:26.1.0@aar" level="project" />
116-
<orderEntry type="library" name="Gradle: com.android.support:support-compat:26.1.0@aar" level="project" />
117-
<orderEntry type="library" name="Gradle: com.android.support:support-core-ui:26.1.0@aar" level="project" />
118-
<orderEntry type="library" name="Gradle: com.android.support:support-annotations:26.1.0@jar" level="project" />
119-
<orderEntry type="library" name="Gradle: com.android.support:support-media-compat:26.1.0@aar" level="project" />
127+
<orderEntry type="library" name="Gradle: androidx.swiperefreshlayout:swiperefreshlayout:1.0.0@aar" level="project" />
128+
<orderEntry type="library" name="Gradle: androidx.legacy:legacy-support-core-ui:1.0.0@aar" level="project" />
129+
<orderEntry type="library" name="Gradle: androidx.viewpager:viewpager:1.0.0@aar" level="project" />
130+
<orderEntry type="library" name="Gradle: androidx.loader:loader:1.0.0@aar" level="project" />
131+
<orderEntry type="library" name="Gradle: androidx.drawerlayout:drawerlayout:1.0.0@aar" level="project" />
132+
<orderEntry type="library" name="Gradle: androidx.documentfile:documentfile:1.0.0@aar" level="project" />
133+
<orderEntry type="library" name="Gradle: androidx.localbroadcastmanager:localbroadcastmanager:1.0.0@aar" level="project" />
134+
<orderEntry type="library" name="Gradle: androidx.lifecycle:lifecycle-runtime:2.0.0@aar" level="project" />
135+
<orderEntry type="library" name="Gradle: androidx.lifecycle:lifecycle-livedata-core:2.0.0@aar" level="project" />
136+
<orderEntry type="library" name="Gradle: androidx.cursoradapter:cursoradapter:1.0.0@aar" level="project" />
137+
<orderEntry type="library" name="Gradle: androidx.lifecycle:lifecycle-livedata:2.0.0@aar" level="project" />
138+
<orderEntry type="library" name="Gradle: androidx.customview:customview:1.0.0@aar" level="project" />
139+
<orderEntry type="library" name="Gradle: androidx.core:core:1.0.0@aar" level="project" />
140+
<orderEntry type="library" name="Gradle: androidx.asynclayoutinflater:asynclayoutinflater:1.0.0@aar" level="project" />
141+
<orderEntry type="library" name="Gradle: androidx.interpolator:interpolator:1.0.0@aar" level="project" />
142+
<orderEntry type="library" name="Gradle: androidx.fragment:fragment:1.0.0@aar" level="project" />
143+
<orderEntry type="library" name="Gradle: androidx.lifecycle:lifecycle-common:2.0.0@jar" level="project" />
144+
<orderEntry type="library" name="Gradle: androidx.legacy:legacy-support-core-utils:1.0.0@aar" level="project" />
145+
<orderEntry type="library" name="Gradle: androidx.print:print:1.0.0@aar" level="project" />
146+
<orderEntry type="library" name="Gradle: androidx.versionedparcelable:versionedparcelable:1.0.0@aar" level="project" />
147+
<orderEntry type="library" name="Gradle: androidx.lifecycle:lifecycle-viewmodel:2.0.0@aar" level="project" />
148+
<orderEntry type="library" name="Gradle: androidx.slidingpanelayout:slidingpanelayout:1.0.0@aar" level="project" />
149+
<orderEntry type="library" name="Gradle: androidx.arch.core:core-common:2.0.0@jar" level="project" />
150+
<orderEntry type="library" name="Gradle: androidx.media:media:1.0.0@aar" level="project" />
151+
<orderEntry type="library" name="Gradle: androidx.annotation:annotation:1.0.0@jar" level="project" />
152+
<orderEntry type="library" name="Gradle: androidx.coordinatorlayout:coordinatorlayout:1.0.0@aar" level="project" />
153+
<orderEntry type="library" name="Gradle: androidx.legacy:legacy-support-v4:1.0.0@aar" level="project" />
154+
<orderEntry type="library" name="Gradle: androidx.arch.core:core-runtime:2.0.0@aar" level="project" />
155+
<orderEntry type="library" name="Gradle: androidx.collection:collection:1.0.0@jar" level="project" />
120156
</component>
121157
</module>
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
apply plugin: 'com.android.library'
22

33
android {
4-
compileSdkVersion 26
5-
buildToolsVersion "26.0.2"
4+
compileSdkVersion 28
5+
buildToolsVersion "28.0.3"
66

77
defaultConfig {
88
minSdkVersion 17
9-
targetSdkVersion 26
9+
targetSdkVersion 28
1010
versionCode 2
1111
versionName "1.1.1"
1212
}
@@ -19,6 +19,6 @@ android {
1919
}
2020

2121
dependencies {
22-
compile fileTree(dir: 'libs', include: ['*.jar'])
23-
compile "com.android.support:support-v4:26.1.0"
22+
implementation fileTree(dir: 'libs', include: ['*.jar'])
23+
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
2424
}

native-src/android/app/src/main/java/com/telerik/localnotifications/Action.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.telerik.localnotifications;
22

33
import android.content.Context;
4-
import android.support.v4.app.RemoteInput;
4+
import androidx.core.app.RemoteInput;
55
import android.util.Log;
66

77
import org.json.JSONArray;

native-src/android/app/src/main/java/com/telerik/localnotifications/Builder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
import android.content.Intent;
99
import android.graphics.Bitmap;
1010
import android.graphics.Color;
11-
import android.support.annotation.Nullable;
12-
import android.support.v4.app.NotificationCompat;
11+
import androidx.annotation.Nullable;
12+
import androidx.core.app.NotificationCompat;
1313
import android.util.Log;
1414

1515
import org.json.JSONArray;

native-src/android/app/src/main/java/com/telerik/localnotifications/NotificationActionReceiver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
import android.content.Intent;
77
import android.content.pm.PackageManager;
88
import android.os.Bundle;
9-
import android.support.annotation.Nullable;
10-
import android.support.v4.app.RemoteInput;
9+
import androidx.annotation.Nullable;
10+
import androidx.core.app.RemoteInput;
1111
import android.util.Log;
1212

1313
import org.json.JSONException;

native-src/android/app/src/main/java/com/telerik/localnotifications/NotificationClearedReceiver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import android.content.Intent;
55

66
import android.content.BroadcastReceiver;
7-
import android.support.annotation.Nullable;
7+
import androidx.annotation.Nullable;
88

99
import org.json.JSONObject;
1010

native-src/android/app/src/main/java/com/telerik/localnotifications/Store.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.telerik.localnotifications;
22

33
import android.content.Context;
4-
import android.support.annotation.Nullable;
4+
import androidx.annotation.Nullable;
55
import android.util.Log;
66

77
import org.json.JSONException;

native-src/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
jcenter()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.0.1'
9+
classpath 'com.android.tools.build:gradle:3.4.1'
1010

1111
// NOTE: Do not place your application dependencies here; they belong
1212
// in the individual module build.gradle files

0 commit comments

Comments
 (0)