Skip to content

Commit

Permalink
feat!: use built in Kotlin support, requires cordova-android >=9
Browse files Browse the repository at this point in the history
  • Loading branch information
timbru31 committed Aug 1, 2020
1 parent 2fb8cf9 commit 5a22276
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 44 deletions.
11 changes: 0 additions & 11 deletions hooks/android-build-extras.gradle

This file was deleted.

9 changes: 0 additions & 9 deletions hooks/app-build-extras.gradle

This file was deleted.

15 changes: 0 additions & 15 deletions hooks/copy_build_extras.js

This file was deleted.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
"1.0.0": {
"cordova": ">= 7.0.0",
"cordova-android": ">=6.4.0"
},
"2.0.0": {
"cordova": ">= 9.0.0",
"cordova-android": ">=9.0.0"
}
}
},
Expand Down
16 changes: 7 additions & 9 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,22 @@
<keywords>cordova,android,rom,detection,device</keywords>

<engines>
<engine name="cordova" version=">=7.0.0" />
<engine name="cordova-android" version=">=6.4.0" />
<engine name="cordova" version=">=9.0.0" />
<engine name="cordova-android" version=">=9.0.0" />
</engines>

<js-module src="dist/www/android-device-information.js" name="AndroidDeviceInformation">
<clobbers target="cordova.plugins.androidDeviceInformation" />
</js-module>

<platform name="android">
<config-file target="res/xml/config.xml" parent="/*">
<feature name="AndroidDeviceInformation">
<param name="android-package" value="de.dustplanet.cordova.AndroidDeviceInformation" />
</feature>
</config-file>
<config-file target="res/xml/config.xml" parent="/*">
<feature name="AndroidDeviceInformation">
<param name="android-package" value="de.dustplanet.cordova.AndroidDeviceInformation" />
</feature>
</config-file>

<source-file src="src/android/AndroidDeviceInformation.kt" target-dir="app/src/main/kotlin/de/dustplanet/cordova" />
<framework src="src/android/build-extras.gradle" custom="true" type="gradleReference"/>
<hook type="after_platform_add" src="hooks/copy_build_extras.js" />
<hook type="after_plugin_add" src="hooks/android/copy_build_extras.js" />
</platform>
</plugin>

0 comments on commit 5a22276

Please sign in to comment.