Compare commits

..
Author SHA1 Message Date
semantic-release-bot ad810c8b11 chore: 1.0.3
### @config-plugins/react-native-ble-plx [1.0.3](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-05-09)

### Other chores

* **react-native-ble-plx:** lint fix ([a99c60e](https://github.com/expo/config-plugins/commit/a99c60efd5fe53d369551c9a1323701ab14e935b))
2022-05-09 23:52:05 +00:00
dependabot[bot] e445cb4bc8 chore(deps): bump @expo/config-types in /packages/react-native-branch (#76)
Bumps [@expo/config-types](https://github.com/expo/expo-cli/tree/HEAD/packages/config-types) from 44.0.0 to 45.0.0.
- [Release notes](https://github.com/expo/expo-cli/releases)
- [Changelog](https://github.com/expo/expo-cli/blob/main/CHANGELOG.md)
- [Commits](https://github.com/expo/expo-cli/commits/HEAD/packages/config-types)

---
updated-dependencies:
- dependency-name: "@expo/config-types"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-09 16:48:18 -07:00
semantic-release-bot 9b22a71343 chore: 1.0.3
### @config-plugins/react-native-google-cast [1.0.3](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-23)

### Other chores

* **react-native-google-cast:** lint fix ([21c4928](https://github.com/expo/config-plugins/commit/21c49280d49a3584863d8338e4b34c508249a595))
2022-03-23 19:03:10 +00:00
evanbacon e49a241243 fix: drop build folders 2022-03-23 13:59:17 -05:00
15 changed files with 44 additions and 128 deletions

No files matched your search

-5
View File
@@ -1,5 +0,0 @@
import { ConfigPlugin } from "@expo/config-plugins";
declare const _default: ConfigPlugin<void | {
targetAndroid12?: boolean | undefined;
}>;
export default _default;
-92
View File
@@ -1,92 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const config_plugins_1 = require("@expo/config-plugins");
const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode");
const withXcodeLinkBinaryWithLibraries = (config, { library, status }) => {
return config_plugins_1.withXcodeProject(config, (config) => {
const options = status === "optional" ? { weak: true } : {};
const target = config_plugins_1.IOSConfig.XcodeUtils.getApplicationNativeTarget({
project: config.modResults,
projectName: config.modRequest.projectName,
});
config.modResults.addFramework(library, {
target: target.uuid,
...options,
});
return config;
});
};
const addAndroidPackagingOptions = (src) => {
return generateCode_1.mergeContents({
tag: "react-native-play-services-analytics",
src,
newSrc: `
implementation 'com.google.android.gms:play-services-analytics:18.0.1'
implementation 'com.android.installreferrer:installreferrer:2.2'
`,
anchor: /dependencies(?:\s+)?\{/,
// Inside the dependencies block.
offset: 1,
comment: "//",
});
};
const withGradle = (config) => {
return config_plugins_1.withAppBuildGradle(config, (config) => {
if (config.modResults.language === "groovy") {
config.modResults.contents = addAndroidPackagingOptions(config.modResults.contents).contents;
}
else {
throw new Error("Cannot add Play Services maven gradle because the project build.gradle is not groovy");
}
return config;
});
};
/**
* Apply react-native-adjust configuration for Expo SDK +44 projects.
*/
const withAdjustPlugin = (config, _props) => {
const props = _props || {};
config = withXcodeLinkBinaryWithLibraries(config, {
library: "iAd.framework",
status: "optional",
});
config = withXcodeLinkBinaryWithLibraries(config, {
library: "AdServices.framework",
status: "optional",
});
config = withXcodeLinkBinaryWithLibraries(config, {
library: "AdSupport.framework",
status: "optional",
});
config = withXcodeLinkBinaryWithLibraries(config, {
library: "StoreKit.framework",
status: "optional",
});
config = withXcodeLinkBinaryWithLibraries(config, {
library: "AppTrackingTransparency.framework",
status: "optional",
});
if (props.targetAndroid12) {
config = config_plugins_1.AndroidConfig.Version.withBuildScriptExtMinimumVersion(config, {
name: "compileSdkVersion",
minVersion: 31,
});
config = config_plugins_1.AndroidConfig.Permissions.withPermissions(config, [
"com.google.android.gms.permission.AD_ID",
]);
}
config = withGradle(config);
// Return the modified config.
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-adjust` to a future
// upstream plugin in `react-native-adjust`
name: "react-native-adjust",
// 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(withAdjustPlugin, pkg.name, pkg.version);
@@ -1,3 +1,10 @@
### @config-plugins/react-native-ble-plx [1.0.3](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-05-09)
### Other chores
* **react-native-ble-plx:** lint fix ([a99c60e](https://github.com/expo/config-plugins/commit/a99c60efd5fe53d369551c9a1323701ab14e935b))
### @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) ### @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)
-1
View File
@@ -1,5 +1,4 @@
"use strict"; "use strict";
/* eslint-disable flowtype/no-types-missing-file-annotation */
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.BackgroundMode = void 0; exports.BackgroundMode = void 0;
const config_plugins_1 = require("@expo/config-plugins"); const config_plugins_1 = require("@expo/config-plugins");
+1 -1
View File
@@ -1,5 +1,5 @@
import { ConfigPlugin, AndroidConfig } from "@expo/config-plugins"; import { ConfigPlugin, AndroidConfig } from "@expo/config-plugins";
declare type InnerManifest = AndroidConfig.Manifest.AndroidManifest['manifest']; declare type InnerManifest = AndroidConfig.Manifest.AndroidManifest["manifest"];
declare type ManifestPermission = InnerManifest["permission"]; declare type ManifestPermission = InnerManifest["permission"];
declare type AndroidManifest = { declare type AndroidManifest = {
manifest: InnerManifest & { manifest: InnerManifest & {
-1
View File
@@ -1,5 +1,4 @@
"use strict"; "use strict";
/* eslint-disable flowtype/no-types-missing-file-annotation */
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.addBLEHardwareFeatureToManifest = exports.addFineControlPermissionToManifest = exports.withBLEAndroidManifest = void 0; exports.addBLEHardwareFeatureToManifest = exports.addFineControlPermissionToManifest = exports.withBLEAndroidManifest = void 0;
const config_plugins_1 = require("@expo/config-plugins"); const config_plugins_1 = require("@expo/config-plugins");
+1 -1
View File
@@ -1,4 +1,4 @@
import { ConfigPlugin } from '@expo/config-plugins'; import { ConfigPlugin } from "@expo/config-plugins";
export declare enum BackgroundMode { export declare enum BackgroundMode {
Central = "central", Central = "central",
Peripheral = "peripheral" Peripheral = "peripheral"
+4 -5
View File
@@ -1,7 +1,6 @@
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.withBLEBackgroundModes = exports.BackgroundMode = void 0; exports.withBLEBackgroundModes = exports.BackgroundMode = void 0;
/* eslint-disable flowtype/no-types-missing-file-annotation */
const config_plugins_1 = require("@expo/config-plugins"); const config_plugins_1 = require("@expo/config-plugins");
var BackgroundMode; var BackgroundMode;
(function (BackgroundMode) { (function (BackgroundMode) {
@@ -9,18 +8,18 @@ var BackgroundMode;
BackgroundMode["Peripheral"] = "peripheral"; BackgroundMode["Peripheral"] = "peripheral";
})(BackgroundMode = exports.BackgroundMode || (exports.BackgroundMode = {})); })(BackgroundMode = exports.BackgroundMode || (exports.BackgroundMode = {}));
function ensureKey(arr, key) { function ensureKey(arr, key) {
if (!arr.find(mode => mode === key)) { if (!arr.find((mode) => mode === key)) {
arr.push(key); arr.push(key);
} }
return arr; return arr;
} }
const centralKey = 'bluetooth-central'; const centralKey = "bluetooth-central";
const peripheralKey = 'bluetooth-peripheral'; const peripheralKey = "bluetooth-peripheral";
/** /**
* Append `UIBackgroundModes` to the `Info.plist`. * Append `UIBackgroundModes` to the `Info.plist`.
*/ */
const withBLEBackgroundModes = (c, modes) => { const withBLEBackgroundModes = (c, modes) => {
return config_plugins_1.withInfoPlist(c, config => { return config_plugins_1.withInfoPlist(c, (config) => {
if (!Array.isArray(config.modResults.UIBackgroundModes)) { if (!Array.isArray(config.modResults.UIBackgroundModes)) {
config.modResults.UIBackgroundModes = []; config.modResults.UIBackgroundModes = [];
} }
-1
View File
@@ -1,7 +1,6 @@
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.withBluetoothPermissions = void 0; exports.withBluetoothPermissions = void 0;
/* eslint-disable flowtype/no-types-missing-file-annotation */
const config_plugins_1 = require("@expo/config-plugins"); const config_plugins_1 = require("@expo/config-plugins");
const BLUETOOTH_ALWAYS = "Allow $(PRODUCT_NAME) to connect to bluetooth devices"; const BLUETOOTH_ALWAYS = "Allow $(PRODUCT_NAME) to connect to bluetooth devices";
const BLUETOOTH_PERIPHERAL_USAGE = "Allow $(PRODUCT_NAME) to connect to bluetooth devices"; const BLUETOOTH_PERIPHERAL_USAGE = "Allow $(PRODUCT_NAME) to connect to bluetooth devices";
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@config-plugins/react-native-ble-plx", "name": "@config-plugins/react-native-ble-plx",
"version": "1.0.2", "version": "1.0.3",
"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 -1
View File
@@ -34,7 +34,7 @@
}, },
"dependencies": { "dependencies": {
"@expo/config-plugins": "^4.1.0", "@expo/config-plugins": "^4.1.0",
"@expo/config-types": "^44.0.0" "@expo/config-types": "^45.0.0"
}, },
"devDependencies": { "devDependencies": {
"expo-module-scripts": "^2.0.0" "expo-module-scripts": "^2.0.0"
@@ -1,3 +1,10 @@
### @config-plugins/react-native-google-cast [1.0.3](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-23)
### Other chores
* **react-native-google-cast:** lint fix ([21c4928](https://github.com/expo/config-plugins/commit/21c49280d49a3584863d8338e4b34c508249a595))
### @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) ### @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)
+2 -2
View File
@@ -2,8 +2,8 @@
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.withAndroidGoogleCast = void 0; exports.withAndroidGoogleCast = void 0;
const config_plugins_1 = require("@expo/config-plugins"); const config_plugins_1 = require("@expo/config-plugins");
const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode");
const codeMod_1 = require("@expo/config-plugins/build/android/codeMod"); const codeMod_1 = require("@expo/config-plugins/build/android/codeMod");
const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode");
const { addMetaDataItemToMainApplication, getMainApplicationOrThrow } = config_plugins_1.AndroidConfig.Manifest; const { addMetaDataItemToMainApplication, getMainApplicationOrThrow } = config_plugins_1.AndroidConfig.Manifest;
const META_PROVIDER_CLASS = "com.google.android.gms.cast.framework.OPTIONS_PROVIDER_CLASS_NAME"; const META_PROVIDER_CLASS = "com.google.android.gms.cast.framework.OPTIONS_PROVIDER_CLASS_NAME";
const META_RECEIVER_APP_ID = "com.reactnative.googlecast.RECEIVER_APPLICATION_ID"; const META_RECEIVER_APP_ID = "com.reactnative.googlecast.RECEIVER_APPLICATION_ID";
@@ -63,7 +63,7 @@ const withAppBuildGradleImport = (config, { version }) => {
}; };
const withMainActivityLazyLoading = (config) => { const withMainActivityLazyLoading = (config) => {
return config_plugins_1.withMainActivity(config, async (config) => { return config_plugins_1.withMainActivity(config, async (config) => {
let src = codeMod_1.addImports(config.modResults.contents, ["com.google.android.gms.cast.framework.CastContext"], config.modResults.language === "java"); const src = codeMod_1.addImports(config.modResults.contents, ["com.google.android.gms.cast.framework.CastContext"], config.modResults.language === "java");
if (config.modResults.language === "java") { if (config.modResults.language === "java") {
config.modResults.contents = addGoogleCastLazyLoadingImport(src).contents; config.modResults.contents = addGoogleCastLazyLoadingImport(src).contents;
} }
+19 -16
View File
@@ -17,9 +17,12 @@ const withIosWifiEntitlements = (config) => {
}); });
}; };
const LOCAL_NETWORK_USAGE = "${PRODUCT_NAME} uses the local network to discover Cast-enabled devices on your WiFi network"; const LOCAL_NETWORK_USAGE = "${PRODUCT_NAME} uses the local network to discover Cast-enabled devices on your WiFi network";
const BLUETOOTH_ALWAYS_USAGE = "${PRODUCT_NAME} uses Bluetooth to discover nearby Cast devices"; // const BLUETOOTH_ALWAYS_USAGE =
const BLUETOOTH_PERIPHERAL_USAGE = "${PRODUCT_NAME} uses Bluetooth to discover nearby Cast devices"; // "${PRODUCT_NAME} uses Bluetooth to discover nearby Cast devices";
const MICROPHONE_USAGE = "${PRODUCT_NAME} uses microphone access to listen for ultrasonic tokens when pairing with nearby Cast devices"; // const BLUETOOTH_PERIPHERAL_USAGE =
// "${PRODUCT_NAME} uses Bluetooth to discover nearby Cast devices";
// const MICROPHONE_USAGE =
// "${PRODUCT_NAME} uses microphone access to listen for ultrasonic tokens when pairing with nearby Cast devices";
/** /**
* On iOS, a dialog asking the user for the local network permission will now be displayed immediately when the app is opened. * On iOS, a dialog asking the user for the local network permission will now be displayed immediately when the app is opened.
* *
@@ -45,19 +48,19 @@ const withIosLocalNetworkPermissions = (config, { receiverAppId = "CC1AD845" } =
return config; return config;
}); });
}; };
const withIosGuestMode = (config) => { // const withIosGuestMode: ConfigPlugin = (config) => {
return config_plugins_1.withInfoPlist(config, (config) => { // return withInfoPlist(config, (config) => {
config.modResults.NSBluetoothAlwaysUsageDescription = // config.modResults.NSBluetoothAlwaysUsageDescription =
config.modResults.NSBluetoothAlwaysUsageDescription || // config.modResults.NSBluetoothAlwaysUsageDescription ||
BLUETOOTH_ALWAYS_USAGE; // BLUETOOTH_ALWAYS_USAGE;
config.modResults.NSBluetoothPeripheralUsageDescription = // config.modResults.NSBluetoothPeripheralUsageDescription =
config.modResults.NSBluetoothPeripheralUsageDescription || // config.modResults.NSBluetoothPeripheralUsageDescription ||
BLUETOOTH_PERIPHERAL_USAGE; // BLUETOOTH_PERIPHERAL_USAGE;
config.modResults.NSMicrophoneUsageDescription = // config.modResults.NSMicrophoneUsageDescription =
config.modResults.NSMicrophoneUsageDescription || MICROPHONE_USAGE; // config.modResults.NSMicrophoneUsageDescription || MICROPHONE_USAGE;
return config; // return config;
}); // });
}; // };
// TODO: Use AppDelegate swizzling // TODO: Use AppDelegate swizzling
const withIosAppDelegateLoaded = (config, props) => { const withIosAppDelegateLoaded = (config, props) => {
return config_plugins_1.withAppDelegate(config, (config) => { return config_plugins_1.withAppDelegate(config, (config) => {
@@ -1,6 +1,6 @@
{ {
"name": "@config-plugins/react-native-google-cast", "name": "@config-plugins/react-native-google-cast",
"version": "1.0.2", "version": "1.0.3",
"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",