Skip to content

Commit

Permalink
RMET-3653 - Prepare to release version 4.2.0-OS51 (#140)
Browse files Browse the repository at this point in the history
* RMET-3653 - Add support for capacitor and add missing permissions (#139)

* test: remove hook to test plugin

* test: use edit-config instead of config-file

* fix: replace config-file with edit-config and remove unnecessary hook

References: https://outsystemsrd.atlassian.net/browse/RMET-3653

* chore: remove unused hook

References: https://outsystemsrd.atlassian.net/browse/RMET-3653

* chore: remove the usage of kotlin-kapt plugin

Context: It wasn't being used.

References: https://outsystemsrd.atlassian.net/browse/RMET-3653

* feat: update dependency to OSCameraLib-Android

References: https://outsystemsrd.atlassian.net/browse/RMET-3653

* test: use manifest as parent

References: https://outsystemsrd.atlassian.net/browse/RMET-3653

* chore: don't need to specify Manifest as parent

References: https://outsystemsrd.atlassian.net/browse/RMET-3653

* chore: update dependency to OSCameraLib-Android

References: https://outsystemsrd.atlassian.net/browse/RMET-3653

* fix: add necessary permissions to AndroidManifest.xml

Context: MABS 11 was updated with the latest version of the native shell, which removes this permissions, so plugins need to add them.

References: https://outsystemsrd.atlassian.net/browse/RMET-3856

* chore(release): prepare to release version 4.2.0-OS51

References: https://outsystemsrd.atlassian.net/browse/RMET-3857
  • Loading branch information
alexgerardojacinto authored Nov 21, 2024
1 parent a7860ce commit 0e07a10
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 175 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

The changes documented here do not include those from the original repository.

## 4.2.0-OS51

### Features

- (android) Adds support for Capacitor builds.

### Fixes

- (android) Add missing permissions for camera and file access.

### Chores

- (android) Removes unnecessary kotlin-kapt plugin, as well as hook.

## 4.2.0-OS50

### Fixes
Expand Down
41 changes: 0 additions & 41 deletions hooks/AndroidManifestPatcher.js

This file was deleted.

19 changes: 0 additions & 19 deletions hooks/install_prerequisites.js

This file was deleted.

9 changes: 0 additions & 9 deletions hooks/package.json

This file was deleted.

96 changes: 0 additions & 96 deletions hooks/utils.js

This file was deleted.

2 changes: 0 additions & 2 deletions libs/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ repositories {
}
}

apply plugin: 'kotlin-kapt'

dependencies {
implementation("com.github.outsystems:oscamera-android:1.2.6@aar")
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-camera",
"version": "4.2.0-OS50",
"version": "4.2.0-OS51",
"description": "Cordova Camera Plugin",
"types": "./types/index.d.ts",
"cordova": {
Expand Down
14 changes: 7 additions & 7 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-camera"
version="4.2.0-OS50">
version="4.2.0-OS51">
<name>Camera</name>
<description>Cordova Camera Plugin</description>
<license>Apache 2.0</license>
Expand Down Expand Up @@ -49,8 +49,6 @@
<!-- android -->
<platform name="android">

<hook type="after_plugin_install" src="hooks/AndroidManifestPatcher.js" />

<config-file target="res/xml/config.xml" parent="/*">

<feature name="Camera">
Expand All @@ -65,11 +63,13 @@

<config-file target="AndroidManifest.xml" parent="/*">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
<uses-permission android:name="android.permission.CAMERA" />
</config-file>

<config-file target="AndroidManifest.xml" parent="application">
<edit-config target="AndroidManifest.xml" parent="application">
<provider
android:name="org.apache.cordova.camera.FileProvider"
android:authorities="${applicationId}.camera.provider"
Expand All @@ -79,9 +79,9 @@
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/camera_provider_paths"/>
</provider>
</config-file>
</edit-config>

<config-file target="AndroidManifest.xml" parent="/*">
<edit-config target="AndroidManifest.xml" parent="/*">
<queries>
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
Expand All @@ -93,7 +93,7 @@
<action android:name="android.intent.action.PICK" />
</intent>
</queries>
</config-file>
</edit-config>

<source-file src="src/android/CameraLauncher.kt" target-dir="app/src/main/kotlin/org/apache/cordova/camera" />
<source-file src="src/android/FileProvider.java" target-dir="src/org/apache/cordova/camera" />
Expand Down

0 comments on commit 0e07a10

Please sign in to comment.