mirror of
https://github.com/expo/config-plugins.git
synced 2026-11-13 20:28:07 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
363d36b0bb | ||
|
|
37d11f1867 | ||
|
|
7ecaaf5bd9 | ||
|
|
9ff7299176 | ||
|
|
f1bd9a7e27 | ||
|
|
83b52a3b61 | ||
|
|
16dfad4dc8 | ||
|
|
0f6493e28d | ||
|
|
0d55f9c8c9 | ||
|
|
fa85f7cf36 | ||
|
|
28997c1062 | ||
|
|
d6050beb2a | ||
|
|
5f4e90059e | ||
|
|
c3a375b292 | ||
|
|
1648e8598b |
No files matched your search
@@ -1,25 +0,0 @@
|
|||||||
name: PR Title
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- "*"
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- reopened
|
|
||||||
- edited
|
|
||||||
- synchronize
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
main:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: aslafy-z/[email protected]
|
|
||||||
# continue-on-error: true
|
|
||||||
id: title-check
|
|
||||||
with:
|
|
||||||
success-state: PR title is valid
|
|
||||||
failure-state: "PR title does not follow the conventional commit spec: https://www.conventionalcommits.org/en/v1.0.0/"
|
|
||||||
context-name: pr-title
|
|
||||||
preset: conventional-changelog-angular@latest
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
|
||||||
+5
-1
@@ -51,4 +51,8 @@ xcuserdata
|
|||||||
# VSCode
|
# VSCode
|
||||||
.history/
|
.history/
|
||||||
|
|
||||||
# packages/*/build/
|
# Ignore build folders
|
||||||
|
|
||||||
|
packages/*/build/**
|
||||||
|
packages/*/plugin/build/**
|
||||||
|
packages/@*/*/build/**
|
||||||
@@ -1,3 +1,10 @@
|
|||||||
|
### @config-plugins/android-jsc-intl [1.0.3](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (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/android-jsc-intl [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
### @config-plugins/android-jsc-intl [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@config-plugins/android-jsc-intl",
|
"name": "@config-plugins/android-jsc-intl",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"description": "Config plugin for android-jsc-intl package",
|
"description": "Config plugin for android-jsc-intl package",
|
||||||
"main": "build/withAndroidJscIntl.js",
|
"main": "build/withAndroidJscIntl.js",
|
||||||
"types": "build/withAndroidJscIntl.d.ts",
|
"types": "build/withAndroidJscIntl.d.ts",
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
### @config-plugins/detox [1.2.3](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (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/detox [1.2.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
### @config-plugins/detox [1.2.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@config-plugins/detox",
|
"name": "@config-plugins/detox",
|
||||||
"version": "1.2.2",
|
"version": "1.2.3",
|
||||||
"description": "Config plugin to auto configure detox on prebuild",
|
"description": "Config plugin to auto configure detox on prebuild",
|
||||||
"main": "build/withDetox.js",
|
"main": "build/withDetox.js",
|
||||||
"types": "build/withDetox.d.ts",
|
"types": "build/withDetox.d.ts",
|
||||||
|
|||||||
@@ -1,3 +1,17 @@
|
|||||||
|
### @config-plugins/ffmpeg-kit-react-native [1.0.3](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (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/ffmpeg-kit-react-native [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Other chores
|
||||||
|
|
||||||
|
* **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))
|
||||||
|
|
||||||
### @config-plugins/ffmpeg-kit-react-native [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
### @config-plugins/ffmpeg-kit-react-native [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
-10
@@ -1,10 +0,0 @@
|
|||||||
import { ConfigPlugin } from "@expo/config-plugins";
|
|
||||||
/** Sets a numeric version for a value in the project.gradle buildscript.ext object to be at least the provided props.minVersion, if the existing value is greater then no change will be made. */
|
|
||||||
export declare const withBuildScriptExtMinimumVersion: ConfigPlugin<{
|
|
||||||
name: string;
|
|
||||||
minVersion: number;
|
|
||||||
}>;
|
|
||||||
export declare function setMinBuildScriptExtVersion(buildGradle: string, { name, minVersion }: {
|
|
||||||
name: string;
|
|
||||||
minVersion: number;
|
|
||||||
}): string;
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
// Copied from https://github.com/expo/expo-cli/blob/main/packages/config-plugins/src/android/Version.ts
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
exports.setMinBuildScriptExtVersion = exports.withBuildScriptExtMinimumVersion = void 0;
|
|
||||||
const config_plugins_1 = require("@expo/config-plugins");
|
|
||||||
/** Sets a numeric version for a value in the project.gradle buildscript.ext object to be at least the provided props.minVersion, if the existing value is greater then no change will be made. */
|
|
||||||
const withBuildScriptExtMinimumVersion = (config, props) => {
|
|
||||||
return config_plugins_1.withProjectBuildGradle(config, (config) => {
|
|
||||||
if (config.modResults.language === "groovy") {
|
|
||||||
config.modResults.contents = setMinBuildScriptExtVersion(config.modResults.contents, props);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
config_plugins_1.WarningAggregator.addWarningAndroid("withBuildScriptExtVersion", `Cannot automatically configure project build.gradle if it's not groovy`);
|
|
||||||
}
|
|
||||||
return config;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
exports.withBuildScriptExtMinimumVersion = withBuildScriptExtMinimumVersion;
|
|
||||||
function setMinBuildScriptExtVersion(buildGradle, { name, minVersion }) {
|
|
||||||
var _a;
|
|
||||||
const regex = new RegExp(`(${name}\\s?=\\s?)(\\d+(?:\\.\\d+)?)`);
|
|
||||||
const currentVersion = (_a = buildGradle.match(regex)) === null || _a === void 0 ? void 0 : _a[2];
|
|
||||||
if (!currentVersion) {
|
|
||||||
config_plugins_1.WarningAggregator.addWarningAndroid("withBuildScriptExtVersion", `Cannot set minimum buildscript.ext.${name} version because the property "${name}" cannot be found or does not have a numeric value.`);
|
|
||||||
// TODO: Maybe just add the property...
|
|
||||||
return buildGradle;
|
|
||||||
}
|
|
||||||
const currentVersionNum = Number(currentVersion);
|
|
||||||
return buildGradle.replace(regex, `$1${Math.max(minVersion, currentVersionNum)}`);
|
|
||||||
}
|
|
||||||
exports.setMinBuildScriptExtVersion = setMinBuildScriptExtVersion;
|
|
||||||
+1
-2
@@ -2,7 +2,6 @@
|
|||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const config_plugins_1 = require("@expo/config-plugins");
|
const config_plugins_1 = require("@expo/config-plugins");
|
||||||
const withAndroidFFMPEGPackage_1 = require("./withAndroidFFMPEGPackage");
|
const withAndroidFFMPEGPackage_1 = require("./withAndroidFFMPEGPackage");
|
||||||
const withBuildScriptExtMinimumVersion_1 = require("./withBuildScriptExtMinimumVersion");
|
|
||||||
const withCocoaPodsImport_1 = require("./withCocoaPodsImport");
|
const withCocoaPodsImport_1 = require("./withCocoaPodsImport");
|
||||||
const withIosDeploymentTarget_1 = require("./withIosDeploymentTarget");
|
const withIosDeploymentTarget_1 = require("./withIosDeploymentTarget");
|
||||||
let pkg = {
|
let pkg = {
|
||||||
@@ -31,7 +30,7 @@ const withFFMPEG = (config, _props) => {
|
|||||||
// Android
|
// Android
|
||||||
// Set min SDK Version to 24.
|
// Set min SDK Version to 24.
|
||||||
[
|
[
|
||||||
withBuildScriptExtMinimumVersion_1.withBuildScriptExtMinimumVersion,
|
config_plugins_1.AndroidConfig.Version.withBuildScriptExtMinimumVersion,
|
||||||
{
|
{
|
||||||
name: "minSdkVersion",
|
name: "minSdkVersion",
|
||||||
minVersion: 24,
|
minVersion: 24,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@config-plugins/ffmpeg-kit-react-native",
|
"name": "@config-plugins/ffmpeg-kit-react-native",
|
||||||
"version": "1.0.1",
|
"version": "1.0.3",
|
||||||
"description": "Config plugin to auto configure FFMPEG on prebuild",
|
"description": "Config plugin to auto configure FFMPEG on prebuild",
|
||||||
"main": "build/withFFMPEG.js",
|
"main": "build/withFFMPEG.js",
|
||||||
"types": "build/withFFMPEG.d.ts",
|
"types": "build/withFFMPEG.d.ts",
|
||||||
|
|||||||
-89
@@ -1,89 +0,0 @@
|
|||||||
import { WarningAggregator } from "@expo/config-plugins";
|
|
||||||
import { setMinBuildScriptExtVersion } from "../withBuildScriptExtMinimumVersion";
|
|
||||||
|
|
||||||
const EXAMPLE_PROJECT_BUILD_GRADLE = `
|
|
||||||
buildscript {
|
|
||||||
ext {
|
|
||||||
buildToolsVersion = "29.0.3"
|
|
||||||
minSdkVersion = 21
|
|
||||||
compileSdkVersion = 30
|
|
||||||
targetSdkVersion = 30
|
|
||||||
oddFormat = 30.2
|
|
||||||
}
|
|
||||||
repositories {
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
allprojects {
|
|
||||||
repositories {
|
|
||||||
mavenLocal()
|
|
||||||
maven {
|
|
||||||
// Android JSC is installed from npm
|
|
||||||
url(new File(["node", "--print", "require.resolve('jsc-android/package.json')"].execute(null, rootDir).text.trim(), "../dist"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
describe(setMinBuildScriptExtVersion, () => {
|
|
||||||
beforeEach(() => {
|
|
||||||
// @ts-ignore: jest
|
|
||||||
// eslint-disable-next-line import/namespace
|
|
||||||
WarningAggregator.addWarningAndroid = jest.fn();
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`sets the minSdkVersion in build.gradle if minSdkVersion is given`, () => {
|
|
||||||
expect(
|
|
||||||
setMinBuildScriptExtVersion(EXAMPLE_PROJECT_BUILD_GRADLE, {
|
|
||||||
name: "minSdkVersion",
|
|
||||||
minVersion: 22,
|
|
||||||
})
|
|
||||||
).toMatch(/minSdkVersion = 22/);
|
|
||||||
expect(WarningAggregator.addWarningAndroid).not.toHaveBeenCalled();
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`sets the oddFormat in build.gradle if oddFormat is given`, () => {
|
|
||||||
expect(
|
|
||||||
setMinBuildScriptExtVersion(EXAMPLE_PROJECT_BUILD_GRADLE, {
|
|
||||||
name: "oddFormat",
|
|
||||||
minVersion: 30.3,
|
|
||||||
})
|
|
||||||
).toMatch(/oddFormat = 30\.3/);
|
|
||||||
expect(WarningAggregator.addWarningAndroid).not.toHaveBeenCalled();
|
|
||||||
});
|
|
||||||
it(`does not change the compileSdkVersion in build.gradle if compileSdkVersion is lower than the existing value`, () => {
|
|
||||||
expect(
|
|
||||||
setMinBuildScriptExtVersion(EXAMPLE_PROJECT_BUILD_GRADLE, {
|
|
||||||
name: "compileSdkVersion",
|
|
||||||
minVersion: 12,
|
|
||||||
})
|
|
||||||
).toBe(EXAMPLE_PROJECT_BUILD_GRADLE);
|
|
||||||
expect(WarningAggregator.addWarningAndroid).not.toHaveBeenCalled();
|
|
||||||
});
|
|
||||||
it(`warns when it cannot find the requested value`, () => {
|
|
||||||
expect(
|
|
||||||
setMinBuildScriptExtVersion(EXAMPLE_PROJECT_BUILD_GRADLE, {
|
|
||||||
name: "foobar",
|
|
||||||
minVersion: 12,
|
|
||||||
})
|
|
||||||
).toBe(EXAMPLE_PROJECT_BUILD_GRADLE);
|
|
||||||
expect(WarningAggregator.addWarningAndroid).toBeCalledWith(
|
|
||||||
"withBuildScriptExtVersion",
|
|
||||||
'Cannot set minimum buildscript.ext.foobar version because the property "foobar" cannot be found or does not have a numeric value.'
|
|
||||||
);
|
|
||||||
});
|
|
||||||
it(`does warns when targeting a property with a string value`, () => {
|
|
||||||
expect(
|
|
||||||
setMinBuildScriptExtVersion(EXAMPLE_PROJECT_BUILD_GRADLE, {
|
|
||||||
name: "buildToolsVersion",
|
|
||||||
minVersion: 12,
|
|
||||||
})
|
|
||||||
).toBe(EXAMPLE_PROJECT_BUILD_GRADLE);
|
|
||||||
expect(WarningAggregator.addWarningAndroid).toBeCalledWith(
|
|
||||||
"withBuildScriptExtVersion",
|
|
||||||
'Cannot set minimum buildscript.ext.buildToolsVersion version because the property "buildToolsVersion" cannot be found or does not have a numeric value.'
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
// Copied from https://github.com/expo/expo-cli/blob/main/packages/config-plugins/src/android/Version.ts
|
|
||||||
|
|
||||||
import {
|
|
||||||
ConfigPlugin,
|
|
||||||
WarningAggregator,
|
|
||||||
withProjectBuildGradle,
|
|
||||||
} from "@expo/config-plugins";
|
|
||||||
|
|
||||||
/** Sets a numeric version for a value in the project.gradle buildscript.ext object to be at least the provided props.minVersion, if the existing value is greater then no change will be made. */
|
|
||||||
export const withBuildScriptExtMinimumVersion: ConfigPlugin<{
|
|
||||||
name: string;
|
|
||||||
minVersion: number;
|
|
||||||
}> = (config, props) => {
|
|
||||||
return withProjectBuildGradle(config, (config) => {
|
|
||||||
if (config.modResults.language === "groovy") {
|
|
||||||
config.modResults.contents = setMinBuildScriptExtVersion(
|
|
||||||
config.modResults.contents,
|
|
||||||
props
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
WarningAggregator.addWarningAndroid(
|
|
||||||
"withBuildScriptExtVersion",
|
|
||||||
`Cannot automatically configure project build.gradle if it's not groovy`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return config;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
export function setMinBuildScriptExtVersion(
|
|
||||||
buildGradle: string,
|
|
||||||
{ name, minVersion }: { name: string; minVersion: number }
|
|
||||||
) {
|
|
||||||
const regex = new RegExp(`(${name}\\s?=\\s?)(\\d+(?:\\.\\d+)?)`);
|
|
||||||
const currentVersion = buildGradle.match(regex)?.[2];
|
|
||||||
if (!currentVersion) {
|
|
||||||
WarningAggregator.addWarningAndroid(
|
|
||||||
"withBuildScriptExtVersion",
|
|
||||||
`Cannot set minimum buildscript.ext.${name} version because the property "${name}" cannot be found or does not have a numeric value.`
|
|
||||||
);
|
|
||||||
// TODO: Maybe just add the property...
|
|
||||||
return buildGradle;
|
|
||||||
}
|
|
||||||
|
|
||||||
const currentVersionNum = Number(currentVersion);
|
|
||||||
return buildGradle.replace(
|
|
||||||
regex,
|
|
||||||
`$1${Math.max(minVersion, currentVersionNum)}`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
import {
|
import {
|
||||||
|
AndroidConfig,
|
||||||
ConfigPlugin,
|
ConfigPlugin,
|
||||||
createRunOncePlugin,
|
createRunOncePlugin,
|
||||||
withPlugins,
|
withPlugins,
|
||||||
} from "@expo/config-plugins";
|
} from "@expo/config-plugins";
|
||||||
|
|
||||||
import { withAndroidFFMPEGPackage } from "./withAndroidFFMPEGPackage";
|
import { withAndroidFFMPEGPackage } from "./withAndroidFFMPEGPackage";
|
||||||
import { withBuildScriptExtMinimumVersion } from "./withBuildScriptExtMinimumVersion";
|
|
||||||
import {
|
import {
|
||||||
withCocoaPodsImport,
|
withCocoaPodsImport,
|
||||||
withPodfilePropertiesPackage,
|
withPodfilePropertiesPackage,
|
||||||
@@ -56,7 +56,7 @@ const withFFMPEG: ConfigPlugin<void | Props> = (config, _props) => {
|
|||||||
|
|
||||||
// Set min SDK Version to 24.
|
// Set min SDK Version to 24.
|
||||||
[
|
[
|
||||||
withBuildScriptExtMinimumVersion,
|
AndroidConfig.Version.withBuildScriptExtMinimumVersion,
|
||||||
{
|
{
|
||||||
name: "minSdkVersion",
|
name: "minSdkVersion",
|
||||||
minVersion: 24,
|
minVersion: 24,
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
### @config-plugins/ios-stickers [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (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/ios-stickers [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
### @config-plugins/ios-stickers [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@config-plugins/ios-stickers",
|
"name": "@config-plugins/ios-stickers",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"description": "Config plugin to auto configure iOS iMessage stickers",
|
"description": "Config plugin to auto configure iOS iMessage stickers",
|
||||||
"main": "build/withStickerPack.js",
|
"main": "build/withStickerPack.js",
|
||||||
"types": "build/withStickerPack.d.ts",
|
"types": "build/withStickerPack.d.ts",
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
### @config-plugins/react-native-adjust [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (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-adjust [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
### @config-plugins/react-native-adjust [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@config-plugins/react-native-adjust",
|
"name": "@config-plugins/react-native-adjust",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"description": "Config plugin to auto configure Adjust SDK on prebuild",
|
"description": "Config plugin to auto configure Adjust SDK on prebuild",
|
||||||
"main": "build/withReactNativeAdjust.js",
|
"main": "build/withReactNativeAdjust.js",
|
||||||
"types": "build/withReactNativeAdjust.d.ts",
|
"types": "build/withReactNativeAdjust.d.ts",
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
### @config-plugins/react-native-ble-plx [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (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-ble-plx [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
### @config-plugins/react-native-ble-plx [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@config-plugins/react-native-ble-plx",
|
"name": "@config-plugins/react-native-ble-plx",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"description": "Config plugin to auto configure react-native-ble-plx on prebuild",
|
"description": "Config plugin to auto configure react-native-ble-plx on prebuild",
|
||||||
"main": "build/withBLE.js",
|
"main": "build/withBLE.js",
|
||||||
"types": "build/withBLE.d.ts",
|
"types": "build/withBLE.d.ts",
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
### @config-plugins/react-native-blob-util [1.0.3](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (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-blob-util [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
### @config-plugins/react-native-blob-util [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@config-plugins/react-native-blob-util",
|
"name": "@config-plugins/react-native-blob-util",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"description": "Config plugin to auto configure react-native-blob-util on prebuild",
|
"description": "Config plugin to auto configure react-native-blob-util on prebuild",
|
||||||
"main": "build/withReactNativeBlobUtil.js",
|
"main": "build/withReactNativeBlobUtil.js",
|
||||||
"types": "build/withReactNativeBlobUtil.d.ts",
|
"types": "build/withReactNativeBlobUtil.d.ts",
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
### @config-plugins/react-native-branch [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (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-branch [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
### @config-plugins/react-native-branch [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@config-plugins/react-native-branch",
|
"name": "@config-plugins/react-native-branch",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"description": "Config plugin to auto configure react-native-branch on prebuild",
|
"description": "Config plugin to auto configure react-native-branch on prebuild",
|
||||||
"author": "650 Industries, Inc.",
|
"author": "650 Industries, Inc.",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
### @config-plugins/react-native-callkeep [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (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-callkeep [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
### @config-plugins/react-native-callkeep [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@config-plugins/react-native-callkeep",
|
"name": "@config-plugins/react-native-callkeep",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"description": "Config plugin to auto configure callkeep on prebuild",
|
"description": "Config plugin to auto configure callkeep on prebuild",
|
||||||
"main": "build/withCallkeep.js",
|
"main": "build/withCallkeep.js",
|
||||||
"types": "build/withCallkeep.d.ts",
|
"types": "build/withCallkeep.d.ts",
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
### @config-plugins/react-native-dynamic-app-icon [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (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-dynamic-app-icon [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
### @config-plugins/react-native-dynamic-app-icon [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@config-plugins/react-native-dynamic-app-icon",
|
"name": "@config-plugins/react-native-dynamic-app-icon",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"description": "Config plugin to auto configure react-native-dynamic-app-icon",
|
"description": "Config plugin to auto configure react-native-dynamic-app-icon",
|
||||||
"main": "build/index.js",
|
"main": "build/index.js",
|
||||||
"types": "build/index.d.ts",
|
"types": "build/index.d.ts",
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
### @config-plugins/react-native-google-cast [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (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-google-cast [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
### @config-plugins/react-native-google-cast [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@config-plugins/react-native-google-cast",
|
"name": "@config-plugins/react-native-google-cast",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"description": "Config plugin to auto configure Google Cast on prebuild",
|
"description": "Config plugin to auto configure Google Cast on prebuild",
|
||||||
"main": "build/withGoogleCast.js",
|
"main": "build/withGoogleCast.js",
|
||||||
"types": "build/withGoogleCast.d.ts",
|
"types": "build/withGoogleCast.d.ts",
|
||||||
|
|||||||
-5
@@ -1,5 +0,0 @@
|
|||||||
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<void>;
|
|
||||||
export default _default;
|
|
||||||
-52
@@ -1,52 +0,0 @@
|
|||||||
"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);
|
|
||||||
-20
@@ -1,20 +0,0 @@
|
|||||||
import { ConfigPlugin, XML } from "@expo/config-plugins";
|
|
||||||
import { MergeResults } from "@expo/config-plugins/build/utils/generateCode";
|
|
||||||
export declare function addQuickActionsAppDelegateImport(src: string): MergeResults;
|
|
||||||
export declare function addQuickActionsAppDelegateInit(src: string): MergeResults;
|
|
||||||
declare const _default: ConfigPlugin<void | {
|
|
||||||
iconType?: string | undefined;
|
|
||||||
title: string;
|
|
||||||
iconSymbolName?: string | undefined;
|
|
||||||
iconFile?: string | undefined;
|
|
||||||
subtitle?: string | undefined;
|
|
||||||
/**
|
|
||||||
* A unique string that the system passes to your app
|
|
||||||
*/
|
|
||||||
type: string;
|
|
||||||
/**
|
|
||||||
* An optional, app-defined dictionary. One use for this dictionary is to provide app version information, as described in the “App Launch and App Update Considerations for Quick Actions” section of the overview in UIApplicationShortcutItem Class Reference.
|
|
||||||
*/
|
|
||||||
userInfo?: XML.XMLObject | undefined;
|
|
||||||
}[]>;
|
|
||||||
export default _default;
|
|
||||||
-106
@@ -1,106 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
exports.addQuickActionsAppDelegateInit = exports.addQuickActionsAppDelegateImport = void 0;
|
|
||||||
const config_plugins_1 = require("@expo/config-plugins");
|
|
||||||
const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode");
|
|
||||||
const remapping = {
|
|
||||||
iconType: "UIApplicationShortcutItemIconType",
|
|
||||||
iconFile: "UIApplicationShortcutItemIconFile",
|
|
||||||
iconSymbolName: "UIApplicationShortcutItemIconSymbolName",
|
|
||||||
title: "UIApplicationShortcutItemTitle",
|
|
||||||
subtitle: "UIApplicationShortcutItemSubtitle",
|
|
||||||
type: "UIApplicationShortcutItemType",
|
|
||||||
userInfo: "UIApplicationShortcutItemUserInfo",
|
|
||||||
};
|
|
||||||
// #import "RNQuickActionManager.h"
|
|
||||||
// https://github.com/jordanbyron/react-native-quick-actions#adding-static-quick-actions---ios-only
|
|
||||||
// https://developer.apple.com/documentation/uikit/menus_and_shortcuts/add_home_screen_quick_actions
|
|
||||||
// TODO: Auto generate images in asset catalogues
|
|
||||||
/**
|
|
||||||
* Apply react-native-quick-actions configuration for Expo SDK 42 projects.
|
|
||||||
*/
|
|
||||||
const withReactNativeQuickActions = (config, _items) => {
|
|
||||||
config = withQuickActionsAppDelegate(config);
|
|
||||||
const items = _items || [];
|
|
||||||
if (!Array.isArray(items) || !items.length) {
|
|
||||||
return config;
|
|
||||||
}
|
|
||||||
return config_plugins_1.withInfoPlist(config, (config) => {
|
|
||||||
config.modResults.UIApplicationShortcutItems = items.map((item) => {
|
|
||||||
const result = {};
|
|
||||||
for (const [key, value] of Object.entries(remapping)) {
|
|
||||||
// @ts-expect-error
|
|
||||||
const itemValue = item[key];
|
|
||||||
if (itemValue) {
|
|
||||||
result[value] = itemValue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
});
|
|
||||||
for (const index in config.modResults.UIApplicationShortcutItems) {
|
|
||||||
const item = config.modResults.UIApplicationShortcutItems[index];
|
|
||||||
for (const key of Object.keys(item)) {
|
|
||||||
if (!item[key]) {
|
|
||||||
// @ts-expect-error
|
|
||||||
delete config.modResults.UIApplicationShortcutItems[index][key];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return config;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
function addQuickActionsAppDelegateImport(src) {
|
|
||||||
return generateCode_1.mergeContents({
|
|
||||||
tag: "react-native-quick-actions-import",
|
|
||||||
src,
|
|
||||||
newSrc: '#import "RNQuickActionManager.h"',
|
|
||||||
anchor: /#import "AppDelegate\.h"/,
|
|
||||||
offset: 1,
|
|
||||||
comment: "//",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
exports.addQuickActionsAppDelegateImport = addQuickActionsAppDelegateImport;
|
|
||||||
function addQuickActionsAppDelegateInit(src) {
|
|
||||||
const newSrc = [];
|
|
||||||
newSrc.push("- (void)application:(UIApplication *)application performActionForShortcutItem:(UIApplicationShortcutItem *)shortcutItem completionHandler:(void (^)(BOOL succeeded)) completionHandler {", " [RNQuickActionManager onQuickActionPress:shortcutItem completionHandler:completionHandler];", "}");
|
|
||||||
return generateCode_1.mergeContents({
|
|
||||||
tag: "react-native-quick-actions-delegate",
|
|
||||||
src,
|
|
||||||
newSrc: newSrc.join("\n"),
|
|
||||||
anchor: /-\s?\(BOOL\)application:\(UIApplication\s?\*\)application/,
|
|
||||||
offset: 0,
|
|
||||||
comment: "//",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
exports.addQuickActionsAppDelegateInit = addQuickActionsAppDelegateInit;
|
|
||||||
const withQuickActionsAppDelegate = (config) => {
|
|
||||||
return config_plugins_1.withAppDelegate(config, (config) => {
|
|
||||||
if (config.modResults.language === "objc") {
|
|
||||||
try {
|
|
||||||
config.modResults.contents = addQuickActionsAppDelegateImport(config.modResults.contents).contents;
|
|
||||||
config.modResults.contents = addQuickActionsAppDelegateInit(config.modResults.contents).contents;
|
|
||||||
}
|
|
||||||
catch (error) {
|
|
||||||
if (error.code === "ERR_NO_MATCH") {
|
|
||||||
throw new Error(`Cannot add QuickActions to the project's AppDelegate because it's malformed. Please report this with a copy of your project AppDelegate.`);
|
|
||||||
}
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
throw new Error("Cannot setup QuickActions because the AppDelegate is not Objective C");
|
|
||||||
}
|
|
||||||
return config;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
const pkg = {
|
|
||||||
// Prevent this plugin from being run more than once.
|
|
||||||
// This pattern enables users to safely migrate off of this
|
|
||||||
// out-of-tree `@config-plugins/react-native-quick-actions` to a future
|
|
||||||
// upstream plugin in `react-native-quick-actions`
|
|
||||||
name: "react-native-quick-actions",
|
|
||||||
// Indicates that this plugin is dangerously linked to a module,
|
|
||||||
// and might not work with the latest version of that module.
|
|
||||||
version: "UNVERSIONED",
|
|
||||||
};
|
|
||||||
exports.default = config_plugins_1.createRunOncePlugin(withReactNativeQuickActions, pkg.name, pkg.version);
|
|
||||||
-2
@@ -1,2 +0,0 @@
|
|||||||
import { ConfigPlugin } from "@expo/config-plugins";
|
|
||||||
export declare const withBitcodeDisabled: ConfigPlugin;
|
|
||||||
-19
@@ -1,19 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
exports.withBitcodeDisabled = void 0;
|
|
||||||
const config_plugins_1 = require("@expo/config-plugins");
|
|
||||||
const withBitcodeDisabled = (config) => {
|
|
||||||
var _a, _b;
|
|
||||||
if (!config.ios) {
|
|
||||||
config.ios = {};
|
|
||||||
}
|
|
||||||
if (((_a = config.ios) === null || _a === void 0 ? void 0 : _a.bitcode) != null && ((_b = config.ios) === null || _b === void 0 ? void 0 : _b.bitcode) !== false) {
|
|
||||||
config_plugins_1.WarningAggregator.addWarningIOS("ios.bitcode", "react-native-webrtc plugin is overwriting project bitcode settings. WebRTC requires bitcode to be disabled for builds, targeting physical iOS devices.");
|
|
||||||
}
|
|
||||||
// WebRTC requires Bitcode be disabled for
|
|
||||||
// production AND development iOS builds that target devices, e.g. not simulators.
|
|
||||||
// SDK +44 property
|
|
||||||
config.ios.bitcode = false;
|
|
||||||
return config;
|
|
||||||
};
|
|
||||||
exports.withBitcodeDisabled = withBitcodeDisabled;
|
|
||||||
-6
@@ -1,6 +0,0 @@
|
|||||||
import { ConfigPlugin } from "@expo/config-plugins";
|
|
||||||
/**
|
|
||||||
* Set the `android.enableDexingArtifactTransform.desugaring` value in the static `gradle.properties` file.
|
|
||||||
* This is used to disable desugaring to fix weird Android bugs. [Learn more](https://github.com/jitsi/jitsi-meet/issues/7911#issuecomment-714323255).
|
|
||||||
*/
|
|
||||||
export declare const withDesugaring: ConfigPlugin<boolean>;
|
|
||||||
-26
@@ -1,26 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
exports.withDesugaring = void 0;
|
|
||||||
const config_plugins_1 = require("@expo/config-plugins");
|
|
||||||
/**
|
|
||||||
* Set the `android.enableDexingArtifactTransform.desugaring` value in the static `gradle.properties` file.
|
|
||||||
* This is used to disable desugaring to fix weird Android bugs. [Learn more](https://github.com/jitsi/jitsi-meet/issues/7911#issuecomment-714323255).
|
|
||||||
*/
|
|
||||||
const withDesugaring = (config, isDisabled) => {
|
|
||||||
const desugaringKey = "android.enableDexingArtifactTransform.desugaring";
|
|
||||||
return config_plugins_1.withGradleProperties(config, (config) => {
|
|
||||||
config.modResults = config.modResults.filter((item) => {
|
|
||||||
if (item.type == "property" && item.key === desugaringKey) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
config.modResults.push({
|
|
||||||
type: "property",
|
|
||||||
key: desugaringKey,
|
|
||||||
value: String(!isDisabled),
|
|
||||||
});
|
|
||||||
return config;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
exports.withDesugaring = withDesugaring;
|
|
||||||
-6
@@ -1,6 +0,0 @@
|
|||||||
import { ConfigPlugin } from "@expo/config-plugins";
|
|
||||||
export declare type IOSPermissionsProps = {
|
|
||||||
cameraPermission?: string;
|
|
||||||
microphonePermission?: string;
|
|
||||||
};
|
|
||||||
export declare const withPermissions: ConfigPlugin<IOSPermissionsProps | void>;
|
|
||||||
-21
@@ -1,21 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
exports.withPermissions = void 0;
|
|
||||||
const config_plugins_1 = require("@expo/config-plugins");
|
|
||||||
const CAMERA_USAGE = "Allow $(PRODUCT_NAME) to access your camera";
|
|
||||||
const MICROPHONE_USAGE = "Allow $(PRODUCT_NAME) to access your microphone";
|
|
||||||
const withPermissions = (config, props) => {
|
|
||||||
return config_plugins_1.withInfoPlist(config, (config) => {
|
|
||||||
const { cameraPermission, microphonePermission } = props || {};
|
|
||||||
config.modResults.NSCameraUsageDescription =
|
|
||||||
cameraPermission ||
|
|
||||||
config.modResults.NSCameraUsageDescription ||
|
|
||||||
CAMERA_USAGE;
|
|
||||||
config.modResults.NSMicrophoneUsageDescription =
|
|
||||||
microphonePermission ||
|
|
||||||
config.modResults.NSMicrophoneUsageDescription ||
|
|
||||||
MICROPHONE_USAGE;
|
|
||||||
return config;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
exports.withPermissions = withPermissions;
|
|
||||||
-4
@@ -1,4 +0,0 @@
|
|||||||
import { ConfigPlugin } from "@expo/config-plugins";
|
|
||||||
import { IOSPermissionsProps } from "./withPermissions";
|
|
||||||
declare const _default: ConfigPlugin<void | IOSPermissionsProps>;
|
|
||||||
export default _default;
|
|
||||||
-31
@@ -1,31 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
const config_plugins_1 = require("@expo/config-plugins");
|
|
||||||
const withBitcodeDisabled_1 = require("./withBitcodeDisabled");
|
|
||||||
const withDesugaring_1 = require("./withDesugaring");
|
|
||||||
const withPermissions_1 = require("./withPermissions");
|
|
||||||
const pkg = { name: "react-native-webrtc", version: "UNVERSIONED" }; //require("react-native-webrtc/package.json");
|
|
||||||
const withWebRTC = (config, props = {}) => {
|
|
||||||
const _props = props || {};
|
|
||||||
// iOS
|
|
||||||
config = withPermissions_1.withPermissions(config, _props);
|
|
||||||
config = withBitcodeDisabled_1.withBitcodeDisabled(config);
|
|
||||||
// Android
|
|
||||||
config = config_plugins_1.AndroidConfig.Permissions.withPermissions(config, [
|
|
||||||
"android.permission.ACCESS_NETWORK_STATE",
|
|
||||||
"android.permission.BLUETOOTH",
|
|
||||||
"android.permission.CAMERA",
|
|
||||||
"android.permission.INTERNET",
|
|
||||||
"android.permission.MODIFY_AUDIO_SETTINGS",
|
|
||||||
"android.permission.RECORD_AUDIO",
|
|
||||||
"android.permission.SYSTEM_ALERT_WINDOW",
|
|
||||||
"android.permission.WAKE_LOCK",
|
|
||||||
]);
|
|
||||||
config = config_plugins_1.AndroidConfig.Version.withBuildScriptExtMinimumVersion(config, {
|
|
||||||
name: "minSdkVersion",
|
|
||||||
minVersion: 24,
|
|
||||||
});
|
|
||||||
config = withDesugaring_1.withDesugaring(config, true);
|
|
||||||
return config;
|
|
||||||
};
|
|
||||||
exports.default = config_plugins_1.createRunOncePlugin(withWebRTC, pkg.name, pkg.version);
|
|
||||||
Reference in new issue
Block a user