You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -101,20 +101,20 @@ If you want to generate typings of a package but you are not sure how you can ge
101
101
102
102
7. Run the dts-generator tool passing as **input** arguments the path to the output jars folder
103
103
104
-
## Android support specifics
105
-
To get all the jar files for android support follow the steps above. You can find the **jar** files for android support 27.0.1 in [the current repository](libs/android-support/27.0.1)
106
-
As the android support needs the base android jar file to create its typings you need to pass the android.jar file as a **super** parameter to the generator. To avoid having typings for every different API level you can reuse typings built with API level 17 for all API levels until 23. It's quite easy to test this:
104
+
## Androidx specifics
105
+
To get all the jar files for androidx follow the steps above. You can find the **jar** files for androidx 1.0.0 in [the current repository](libs/androidx/1.0.0)
106
+
As androidx needs the base android jar file to create its typings you need to pass the android.jar file as a **super** parameter to the generator. To avoid having typings for every different API level you can reuse typings built with API level 17 for all API levels until 23. It's quite easy to test this:
107
107
108
-
1. Run the typings generator for android support passing **android-17/android.jar** as a supper jar
108
+
1. Run the typings generator for androidx passing **android-17/android.jar** as a supper jar
109
109
2. Add `/// <reference path="android-17.d.ts"/>` at the top of the generated typings file where android-17.d.ts is the typings file of the android API level 17
110
110
3. Run `tsc` passing the generated typings file and there shouldn't be errors
111
111
4. Now start replacing the reference file with the files from other API level while the `tsc` execution completes with no error
112
112
5. If there's an error this means that you need to generate the android support typings with the same android API level super jar
113
113
114
114
By repeating the steps above we've found that:
115
115
116
-
- Android support 17 typings(built with supper jar from android API 17) can be reused until android API 22
117
-
- Android support 23 typings(built with supper jar from android API 23) can be reused until android API 25
118
-
- Android support 26 typings(built with supper jar from android API 26) can be reused for API 26 and 27
116
+
- Androidx 17 typings(built with supper jar from android API 17) can be reused until android API 22
117
+
- Androidx 23 typings(built with supper jar from android API 23) can be reused until android API 25
118
+
- Androidx 26 typings(built with supper jar from android API 26) can be reused for API 26 and 27
119
119
120
120
The corresponding typings files can be found in the [tns-platform-declarations](https://github.com/NativeScript/NativeScript/tree/master/tns-platform-declarations) package. The repo's [Makefile](Makefile) can be used as a reference for creating these typings files
0 commit comments