From 999cc00275b56c19a49e74068af57e6d54130030 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 22 Mar 2022 18:31:17 +0000 Subject: [PATCH] chore: 1.0.2 ### [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/react-native-pdf@1.0.1...@config-plugins/react-native-pdf@1.0.2) (2022-03-22) ### Features * **react-native-webrtc:** add config mod for Android minSdkVersion 24 ([ff8b167](https://github.com/expo/config-plugins/commit/ff8b1677640a560ca98abd8a83f349b3a1ee9017)) ### Bug Fixes * **detox:** use improved xml generation ([#47](https://github.com/expo/config-plugins/issues/47)) ([6324eb0](https://github.com/expo/config-plugins/commit/6324eb041b3b4eb2318c0a1ea0297e3b7bf28f7c)) ### Other chores * 1.0.2 ([5f4e900](https://github.com/expo/config-plugins/commit/5f4e90059e4dd69579082aa7531b8ef7d2cc9a72)), closes [#60](https://github.com/expo/config-plugins/issues/60) * git ignore build folders ([#59](https://github.com/expo/config-plugins/issues/59)) ([d6050be](https://github.com/expo/config-plugins/commit/d6050beb2a5c68dc59287c27ec388c2002ec7904)) * **ci:** remove PR title validation action ([#62](https://github.com/expo/config-plugins/issues/62)) ([1648e85](https://github.com/expo/config-plugins/commit/1648e8598b959bf8140a2b984af0b8bb85a7e724)) * **ffmpeg-kit-react-native:** update plugin to use `AndroidConfig.Version.withBuildScriptExtMinimumVersion` ([#60](https://github.com/expo/config-plugins/issues/60)) ([c3a375b](https://github.com/expo/config-plugins/commit/c3a375b292d6405be7b3277d10ab4f8dbb006047)) * 1.0.1 ([39a9e63](https://github.com/expo/config-plugins/commit/39a9e63fe975122c5ffff0dd8975ea0dc7639720)), closes [#52](https://github.com/expo/config-plugins/issues/52) [#54](https://github.com/expo/config-plugins/issues/54) [#53](https://github.com/expo/config-plugins/issues/53) [#48](https://github.com/expo/config-plugins/issues/48) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#49](https://github.com/expo/config-plugins/issues/49) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#55](https://github.com/expo/config-plugins/issues/55) * 2.1.0 ([e2d2b27](https://github.com/expo/config-plugins/commit/e2d2b27494b6a207932194c680de8cc6c1e7c02e)) * **repo:** add PR template ([#56](https://github.com/expo/config-plugins/issues/56)) ([eee366b](https://github.com/expo/config-plugins/commit/eee366bebcc42f4cdc4623f8b52790e3082a4472)) * 1.2.2 ([72fa3e1](https://github.com/expo/config-plugins/commit/72fa3e14ef3aa19c375457c81e8899c0ac13f4c9)), closes [#47](https://github.com/expo/config-plugins/issues/47) * 2.0.2 ([480ec19](https://github.com/expo/config-plugins/commit/480ec19161587fb40fb2745511741f806083fc76)), closes [#52](https://github.com/expo/config-plugins/issues/52) [#54](https://github.com/expo/config-plugins/issues/54) [#53](https://github.com/expo/config-plugins/issues/53) [#55](https://github.com/expo/config-plugins/issues/55) --- packages/react-native-pdf/CHANGELOG.md | 7 +++ packages/react-native-pdf/build/withPdf.d.ts | 5 ++ packages/react-native-pdf/build/withPdf.js | 52 ++++++++++++++++++++ packages/react-native-pdf/package.json | 2 +- 4 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 packages/react-native-pdf/build/withPdf.d.ts create mode 100644 packages/react-native-pdf/build/withPdf.js diff --git a/packages/react-native-pdf/CHANGELOG.md b/packages/react-native-pdf/CHANGELOG.md index af903f5a..fcc0eabf 100644 --- a/packages/react-native-pdf/CHANGELOG.md +++ b/packages/react-native-pdf/CHANGELOG.md @@ -1,3 +1,10 @@ +### @config-plugins/react-native-pdf [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/react-native-pdf@1.0.1...@config-plugins/react-native-pdf@1.0.2) (2022-03-22) + + +### Other chores + +* git ignore build folders ([#59](https://github.com/expo/config-plugins/issues/59)) ([d6050be](https://github.com/expo/config-plugins/commit/d6050beb2a5c68dc59287c27ec388c2002ec7904)) + ### @config-plugins/react-native-pdf [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/react-native-pdf@1.0.0...@config-plugins/react-native-pdf@1.0.1) (2022-03-16) diff --git a/packages/react-native-pdf/build/withPdf.d.ts b/packages/react-native-pdf/build/withPdf.d.ts new file mode 100644 index 00000000..89f2514a --- /dev/null +++ b/packages/react-native-pdf/build/withPdf.d.ts @@ -0,0 +1,5 @@ +import { ConfigPlugin } from "@expo/config-plugins"; +export declare const withAndroidPackagingOptions: ConfigPlugin; +export declare function addAndroidPackagingOptions(src: string): import("@expo/config-plugins/build/utils/generateCode").MergeResults; +declare const _default: ConfigPlugin; +export default _default; diff --git a/packages/react-native-pdf/build/withPdf.js b/packages/react-native-pdf/build/withPdf.js new file mode 100644 index 00000000..8ca11e1c --- /dev/null +++ b/packages/react-native-pdf/build/withPdf.js @@ -0,0 +1,52 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.addAndroidPackagingOptions = exports.withAndroidPackagingOptions = void 0; +const config_plugins_1 = require("@expo/config-plugins"); +const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode"); +let pkg = { + name: "react-native-pdf", +}; +try { + pkg = require("react-native-pdf/package.json"); +} +catch (_a) { + // empty catch block +} +const withAndroidPackagingOptions = (config) => { + return config_plugins_1.withAppBuildGradle(config, (config) => { + if (config.modResults.language === "groovy") { + config.modResults.contents = addAndroidPackagingOptions(config.modResults.contents).contents; + } + else { + config_plugins_1.WarningAggregator.addWarningAndroid("@config-plugins/react-native-pdf", `Cannot automatically configure app build.gradle if it's not groovy`); + } + return config; + }); +}; +exports.withAndroidPackagingOptions = withAndroidPackagingOptions; +function addAndroidPackagingOptions(src) { + return generateCode_1.mergeContents({ + tag: "react-native-pdf-packaging-options", + src, + newSrc: packagingOptionsContents, + anchor: /android(?:\s+)?\{/, + // Inside the android block. + offset: 1, + comment: "//", + }); +} +exports.addAndroidPackagingOptions = addAndroidPackagingOptions; +const packagingOptionsContents = ` + packagingOptions { + pickFirst 'lib/x86/libc++_shared.so' + pickFirst 'lib/x86_64/libjsc.so' + pickFirst 'lib/arm64-v8a/libjsc.so' + pickFirst 'lib/arm64-v8a/libc++_shared.so' + pickFirst 'lib/x86_64/libc++_shared.so' + pickFirst 'lib/armeabi-v7a/libc++_shared.so' + } +`; +const withReactNativePdf = (config) => { + return exports.withAndroidPackagingOptions(config); +}; +exports.default = config_plugins_1.createRunOncePlugin(withReactNativePdf, pkg.name, pkg.version); diff --git a/packages/react-native-pdf/package.json b/packages/react-native-pdf/package.json index 84646135..60eb9bad 100644 --- a/packages/react-native-pdf/package.json +++ b/packages/react-native-pdf/package.json @@ -1,6 +1,6 @@ { "name": "@config-plugins/react-native-pdf", - "version": "1.0.1", + "version": "1.0.2", "description": "Config plugin to auto configure react-native-pdf on prebuild", "main": "build/withPdf.js", "types": "build/withPdf.d.ts",