@survicate/react-native-survicate 4.1.1 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -5
- package/android/build.gradle +1 -1
- package/app.plugin.js +10 -0
- package/lib/commonjs/expo/types.js +2 -0
- package/lib/commonjs/expo/types.js.map +1 -0
- package/lib/commonjs/expo/withSurvicate.js +19 -0
- package/lib/commonjs/expo/withSurvicate.js.map +1 -0
- package/lib/commonjs/expo/withSurvicateAndroid.js +79 -0
- package/lib/commonjs/expo/withSurvicateAndroid.js.map +1 -0
- package/lib/commonjs/expo/withSurvicateiOS.js +17 -0
- package/lib/commonjs/expo/withSurvicateiOS.js.map +1 -0
- package/lib/module/expo/types.js +2 -0
- package/lib/module/expo/types.js.map +1 -0
- package/lib/module/expo/withSurvicate.js +13 -0
- package/lib/module/expo/withSurvicate.js.map +1 -0
- package/lib/module/expo/withSurvicateAndroid.js +72 -0
- package/lib/module/expo/withSurvicateAndroid.js.map +1 -0
- package/lib/module/expo/withSurvicateiOS.js +10 -0
- package/lib/module/expo/withSurvicateiOS.js.map +1 -0
- package/lib/typescript/expo/types.d.ts +4 -0
- package/lib/typescript/expo/types.d.ts.map +1 -0
- package/lib/typescript/expo/withSurvicate.d.ts +8 -0
- package/lib/typescript/expo/withSurvicate.d.ts.map +1 -0
- package/lib/typescript/expo/withSurvicateAndroid.d.ts +5 -0
- package/lib/typescript/expo/withSurvicateAndroid.d.ts.map +1 -0
- package/lib/typescript/expo/withSurvicateiOS.d.ts +4 -0
- package/lib/typescript/expo/withSurvicateiOS.d.ts.map +1 -0
- package/package.json +22 -7
- package/react-native-survicate.podspec +1 -1
- package/src/expo/types.ts +3 -0
- package/src/expo/withSurvicate.ts +20 -0
- package/src/expo/withSurvicateAndroid.ts +100 -0
- package/src/expo/withSurvicateiOS.ts +11 -0
- package/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
- package/android/.gradle/7.5.1/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/7.5.1/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/7.5.1/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.5.1/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/7.5.1/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/7.5.1/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.5.1/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.5.1/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/7.5.1/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.gradle/config.properties +0 -2
- package/android/.gradle/file-system.probe +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/compiler.xml +0 -6
- package/android/.idea/gradle.xml +0 -18
- package/android/.idea/migrations.xml +0 -10
- package/android/.idea/misc.xml +0 -9
- package/android/.idea/modules/android.androidTest.iml +0 -6
- package/android/.idea/modules/android.iml +0 -6
- package/android/.idea/modules/android.main.iml +0 -6
- package/android/.idea/modules/android.unitTest.iml +0 -6
- package/android/.idea/sonarlint/issuestore/0/d/0df9aa085b7b8db1dccfbc855a1ace7351a87b1f +0 -0
- package/android/.idea/sonarlint/issuestore/3/4/348c0bbc5ca5287a00a390486ca37dd7b380944a +0 -0
- package/android/.idea/sonarlint/issuestore/5/9/590364a981f27a7c9f1304f29901ba5f8b10c7bb +0 -0
- package/android/.idea/sonarlint/issuestore/6/1/61130b71a87185f8a73a14cbce1419badde70d8b +0 -0
- package/android/.idea/sonarlint/issuestore/f/0/f07866736216be0ee2aba49e392191aeae700a35 +0 -0
- package/android/.idea/sonarlint/issuestore/index.pb +0 -11
- package/android/.idea/sonarlint/securityhotspotstore/0/d/0df9aa085b7b8db1dccfbc855a1ace7351a87b1f +0 -0
- package/android/.idea/sonarlint/securityhotspotstore/3/4/348c0bbc5ca5287a00a390486ca37dd7b380944a +0 -0
- package/android/.idea/sonarlint/securityhotspotstore/5/9/590364a981f27a7c9f1304f29901ba5f8b10c7bb +0 -0
- package/android/.idea/sonarlint/securityhotspotstore/6/1/61130b71a87185f8a73a14cbce1419badde70d8b +0 -0
- package/android/.idea/sonarlint/securityhotspotstore/f/0/f07866736216be0ee2aba49e392191aeae700a35 +0 -0
- package/android/.idea/sonarlint/securityhotspotstore/index.pb +0 -11
- package/android/.idea/vcs.xml +0 -6
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/android/gradlew +0 -240
- package/android/gradlew.bat +0 -91
- package/android/local.properties +0 -8
package/README.md
CHANGED
|
@@ -1,17 +1,34 @@
|
|
|
1
|
-
# @survicate/react-native-survicate
|
|
1
|
+
# @survicate/react-native-survicate 
|
|
2
|
+
|
|
3
|
+
Integrate Survicate into your React Native application to collect user feedback seamlessly.
|
|
2
4
|
|
|
3
5
|
## Requirements:
|
|
4
6
|
- iOS at least on version 12.0
|
|
5
7
|
- Android at least on version 5
|
|
6
8
|
- React Native at least on version 0.60.0
|
|
7
9
|
|
|
8
|
-
##
|
|
10
|
+
## Installation
|
|
11
|
+
This package can be installed using npm or yarn. If you're using Expo, follow the Expo-specific instructions.
|
|
12
|
+
|
|
13
|
+
### Using npm
|
|
14
|
+
```sh
|
|
15
|
+
npm install @survicate/react-native-survicate --save
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Using yarn
|
|
19
|
+
```sh
|
|
20
|
+
yarn add @survicate/react-native-survicate
|
|
21
|
+
```
|
|
9
22
|
|
|
10
|
-
|
|
23
|
+
### Using expo
|
|
24
|
+
> Please note that due to custom native code in this package "Expo Go" is not available.
|
|
11
25
|
|
|
12
|
-
|
|
26
|
+
To use @survicate/react-native-survicate in an Expo managed project use npm, yarn or expo-cli.
|
|
27
|
+
```sh
|
|
28
|
+
expo install @survicate/react-native-survicate
|
|
29
|
+
```
|
|
13
30
|
|
|
14
|
-
|
|
31
|
+
## Configuration
|
|
15
32
|
|
|
16
33
|
### Configuring Survicate Bindings for iOS
|
|
17
34
|
- Add your Survicate workspace key to `Info.plist`
|
|
@@ -45,6 +62,25 @@ allprojects {
|
|
|
45
62
|
</application>
|
|
46
63
|
```
|
|
47
64
|
|
|
65
|
+
### Configuring Survicate Bindings for Expo
|
|
66
|
+
- Add [config plugin](https://docs.expo.dev/config-plugins/introduction/) to `plugins` array of your `app.json` or `app.config.js`
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"expo": {
|
|
70
|
+
"plugins": [
|
|
71
|
+
[
|
|
72
|
+
"@survicate/react-native-survicate",
|
|
73
|
+
{
|
|
74
|
+
"workspaceKey": "YOUR_WORKSPACE_KEY"
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
> Please note that every time you change the props or plugins, you'll need to [rebuild](https://docs.expo.dev/workflow/customizing/) the native app.
|
|
82
|
+
|
|
83
|
+
|
|
48
84
|
## Usage
|
|
49
85
|
```javascript
|
|
50
86
|
import Survicate, {UserTrait} from '@survicate/react-native-survicate';
|
|
@@ -70,6 +106,16 @@ const subscription = Survicate.addSurvicateEventListener(listener);
|
|
|
70
106
|
Survicate.reset();
|
|
71
107
|
```
|
|
72
108
|
|
|
109
|
+
## Issues
|
|
110
|
+
|
|
111
|
+
Got an Issue?
|
|
112
|
+
|
|
113
|
+
To make things more streamlined, we’ve transitioned our issue reporting to our customer support platform. If you encounter any bugs or have feedback, please reach out to our customer support team. Your insights are invaluable to us, and we’re here to help ensure your experience is top-notch!
|
|
114
|
+
|
|
115
|
+
Contact us via Intercom in the application, or drop us an email at: [hello@survicate.com]
|
|
116
|
+
|
|
117
|
+
Thank you for your support and understanding!
|
|
118
|
+
|
|
73
119
|
## Changelog
|
|
74
120
|
|
|
75
121
|
The Survicate Mobile SDK change log can be found [here](https://developers.survicate.com/mobile-sdk/react-native/#changelog)
|
package/android/build.gradle
CHANGED
|
@@ -120,7 +120,7 @@ repositories {
|
|
|
120
120
|
dependencies {
|
|
121
121
|
//noinspection GradleDynamicVersion
|
|
122
122
|
implementation 'com.facebook.react:react-native:+' // From node_modules
|
|
123
|
-
implementation ('com.survicate:survicate-sdk:4.
|
|
123
|
+
implementation ('com.survicate:survicate-sdk:4.2.0')
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
if (isNewArchitectureEnabled()) {
|
package/app.plugin.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["expo/types.ts"],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _configPlugins = require("@expo/config-plugins");
|
|
8
|
+
var _withSurvicateAndroid = require("./withSurvicateAndroid");
|
|
9
|
+
var _withSurvicateiOS = require("./withSurvicateiOS");
|
|
10
|
+
const withSurvicateReactNative = (config, props) => {
|
|
11
|
+
let newConfig = config;
|
|
12
|
+
newConfig = (0, _withSurvicateAndroid.withSurvicateAndroidManifest)(newConfig, props);
|
|
13
|
+
newConfig = (0, _withSurvicateAndroid.withSurvicateAndroidMavenRepository)(newConfig);
|
|
14
|
+
newConfig = (0, _withSurvicateiOS.withSurvicateIosInfoPlist)(newConfig, props);
|
|
15
|
+
return newConfig;
|
|
16
|
+
};
|
|
17
|
+
const configPlugin = pkg => (0, _configPlugins.createRunOncePlugin)(withSurvicateReactNative, pkg.name, pkg.version);
|
|
18
|
+
var _default = exports.default = configPlugin;
|
|
19
|
+
//# sourceMappingURL=withSurvicate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_configPlugins","require","_withSurvicateAndroid","_withSurvicateiOS","withSurvicateReactNative","config","props","newConfig","withSurvicateAndroidManifest","withSurvicateAndroidMavenRepository","withSurvicateIosInfoPlist","configPlugin","pkg","createRunOncePlugin","name","version","_default","exports","default"],"sourceRoot":"../../../src","sources":["expo/withSurvicate.ts"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAEA,IAAAC,qBAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AAEA,MAAMG,wBAA4D,GAAGA,CACnEC,MAAM,EACNC,KAAK,KACF;EACH,IAAIC,SAAS,GAAGF,MAAM;EACtBE,SAAS,GAAG,IAAAC,kDAA4B,EAACD,SAAS,EAAED,KAAK,CAAC;EAC1DC,SAAS,GAAG,IAAAE,yDAAmC,EAACF,SAAS,CAAC;EAC1DA,SAAS,GAAG,IAAAG,2CAAyB,EAACH,SAAS,EAAED,KAAK,CAAC;EACvD,OAAOC,SAAS;AAClB,CAAC;AAED,MAAMI,YAAY,GAAIC,GAAsC,IAC1D,IAAAC,kCAAmB,EAACT,wBAAwB,EAAEQ,GAAG,CAACE,IAAI,EAAEF,GAAG,CAACG,OAAO,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAExDP,YAAY"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.withSurvicateAndroidMavenRepository = exports.withSurvicateAndroidManifest = void 0;
|
|
7
|
+
var _configPlugins = require("expo/config-plugins");
|
|
8
|
+
var _generateCode = require("@expo/config-plugins/build/utils/generateCode");
|
|
9
|
+
// Using helpers keeps error messages unified and helps cut down on XML format changes.
|
|
10
|
+
const {
|
|
11
|
+
addMetaDataItemToMainApplication,
|
|
12
|
+
getMainApplicationOrThrow
|
|
13
|
+
} = _configPlugins.AndroidConfig.Manifest;
|
|
14
|
+
const withSurvicateAndroidManifest = (config, props) => {
|
|
15
|
+
return (0, _configPlugins.withAndroidManifest)(config, async config => {
|
|
16
|
+
// Modifiers can be async, but try to keep them fast.
|
|
17
|
+
config.modResults = await setCustomConfigAsync(config.modResults, props.workspaceKey);
|
|
18
|
+
return config;
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
exports.withSurvicateAndroidManifest = withSurvicateAndroidManifest;
|
|
22
|
+
async function setCustomConfigAsync(androidManifest, workspaceKey) {
|
|
23
|
+
// Get the <application /> tag and assert if it doesn't exist.
|
|
24
|
+
const mainApplication = getMainApplicationOrThrow(androidManifest);
|
|
25
|
+
addMetaDataItemToMainApplication(mainApplication,
|
|
26
|
+
// value for `android:name`
|
|
27
|
+
"com.survicate.surveys.workspaceKey",
|
|
28
|
+
// value for `android:value`
|
|
29
|
+
workspaceKey);
|
|
30
|
+
return androidManifest;
|
|
31
|
+
}
|
|
32
|
+
const withSurvicateAndroidMavenRepository = config => {
|
|
33
|
+
return (0, _configPlugins.withProjectBuildGradle)(config, async config => {
|
|
34
|
+
if (config.modResults.language !== "groovy") {
|
|
35
|
+
console.warn("Unsupported language for build.gradle. Only 'groovy' is supported.");
|
|
36
|
+
return config;
|
|
37
|
+
}
|
|
38
|
+
config.modResults.contents = await appendContents({
|
|
39
|
+
src: config.modResults.contents,
|
|
40
|
+
newSrc: `allprojects { repositories { maven { url 'https://repo.survicate.com' } } }`,
|
|
41
|
+
tag: "@survicate/react-native-survicate",
|
|
42
|
+
comment: "//"
|
|
43
|
+
}).contents;
|
|
44
|
+
return config;
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
// Fork of config-plugins mergeContents, but appends the contents to the end of the file.
|
|
49
|
+
exports.withSurvicateAndroidMavenRepository = withSurvicateAndroidMavenRepository;
|
|
50
|
+
function appendContents({
|
|
51
|
+
src,
|
|
52
|
+
newSrc,
|
|
53
|
+
tag,
|
|
54
|
+
comment
|
|
55
|
+
}) {
|
|
56
|
+
const header = (0, _generateCode.createGeneratedHeaderComment)(newSrc, tag, comment);
|
|
57
|
+
if (!src.includes(header)) {
|
|
58
|
+
// Ensure the old generated contents are removed.
|
|
59
|
+
const sanitizedTarget = (0, _generateCode.removeGeneratedContents)(src, tag);
|
|
60
|
+
const contentsToAdd = [
|
|
61
|
+
// @something
|
|
62
|
+
header,
|
|
63
|
+
// contents
|
|
64
|
+
newSrc,
|
|
65
|
+
// @end
|
|
66
|
+
`${comment} @generated end ${tag}`].join("\n");
|
|
67
|
+
return {
|
|
68
|
+
contents: sanitizedTarget ?? src + contentsToAdd,
|
|
69
|
+
didMerge: true,
|
|
70
|
+
didClear: !!sanitizedTarget
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
contents: src,
|
|
75
|
+
didClear: false,
|
|
76
|
+
didMerge: false
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=withSurvicateAndroid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_configPlugins","require","_generateCode","addMetaDataItemToMainApplication","getMainApplicationOrThrow","AndroidConfig","Manifest","withSurvicateAndroidManifest","config","props","withAndroidManifest","modResults","setCustomConfigAsync","workspaceKey","exports","androidManifest","mainApplication","withSurvicateAndroidMavenRepository","withProjectBuildGradle","language","console","warn","contents","appendContents","src","newSrc","tag","comment","header","createGeneratedHeaderComment","includes","sanitizedTarget","removeGeneratedContents","contentsToAdd","join","didMerge","didClear"],"sourceRoot":"../../../src","sources":["expo/withSurvicateAndroid.ts"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAQA,IAAAC,aAAA,GAAAD,OAAA;AAMA;AACA,MAAM;EAAEE,gCAAgC;EAAEC;AAA0B,CAAC,GACnEC,4BAAa,CAACC,QAAQ;AAEjB,MAAMC,4BAEZ,GAAGA,CAACC,MAAkB,EAAEC,KAA2B,KAAK;EACvD,OAAO,IAAAC,kCAAmB,EAACF,MAAM,EAAE,MAAOA,MAAM,IAAK;IACnD;IACAA,MAAM,CAACG,UAAU,GAAG,MAAMC,oBAAoB,CAC5CJ,MAAM,CAACG,UAAU,EACjBF,KAAK,CAACI,YACR,CAAC;IACD,OAAOL,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;AAACM,OAAA,CAAAP,4BAAA,GAAAA,4BAAA;AAEF,eAAeK,oBAAoBA,CACjCG,eAAuD,EACvDF,YAAoB,EAC6B;EACjD;EACA,MAAMG,eAAe,GAAGZ,yBAAyB,CAACW,eAAe,CAAC;EAElEZ,gCAAgC,CAC9Ba,eAAe;EACf;EACA,oCAAoC;EACpC;EACAH,YACF,CAAC;EAED,OAAOE,eAAe;AACxB;AAEO,MAAME,mCAAiD,GAAIT,MAAM,IAAK;EAC3E,OAAO,IAAAU,qCAAsB,EAACV,MAAM,EAAE,MAAOA,MAAM,IAAK;IACtD,IAAIA,MAAM,CAACG,UAAU,CAACQ,QAAQ,KAAK,QAAQ,EAAE;MAC3CC,OAAO,CAACC,IAAI,CACV,oEACF,CAAC;MACD,OAAOb,MAAM;IACf;IAEAA,MAAM,CAACG,UAAU,CAACW,QAAQ,GAAG,MAAMC,cAAc,CAAC;MAChDC,GAAG,EAAEhB,MAAM,CAACG,UAAU,CAACW,QAAQ;MAC/BG,MAAM,EAAG,6EAA4E;MACrFC,GAAG,EAAE,mCAAmC;MACxCC,OAAO,EAAE;IACX,CAAC,CAAC,CAACL,QAAQ;IACX,OAAOd,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AAAAM,OAAA,CAAAG,mCAAA,GAAAA,mCAAA;AACA,SAASM,cAAcA,CAAC;EACtBC,GAAG;EACHC,MAAM;EACNC,GAAG;EACHC;AAMF,CAAC,EAAgB;EACf,MAAMC,MAAM,GAAG,IAAAC,0CAA4B,EAACJ,MAAM,EAAEC,GAAG,EAAEC,OAAO,CAAC;EACjE,IAAI,CAACH,GAAG,CAACM,QAAQ,CAACF,MAAM,CAAC,EAAE;IACzB;IACA,MAAMG,eAAe,GAAG,IAAAC,qCAAuB,EAACR,GAAG,EAAEE,GAAG,CAAC;IACzD,MAAMO,aAAa,GAAG;IACpB;IACAL,MAAM;IACN;IACAH,MAAM;IACN;IACC,GAAEE,OAAQ,mBAAkBD,GAAI,EAAC,CACnC,CAACQ,IAAI,CAAC,IAAI,CAAC;IACZ,OAAO;MACLZ,QAAQ,EAAES,eAAe,IAAIP,GAAG,GAAGS,aAAa;MAChDE,QAAQ,EAAE,IAAI;MACdC,QAAQ,EAAE,CAAC,CAACL;IACd,CAAC;EACH;EACA,OAAO;IAAET,QAAQ,EAAEE,GAAG;IAAEY,QAAQ,EAAE,KAAK;IAAED,QAAQ,EAAE;EAAM,CAAC;AAC5D"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.withSurvicateIosInfoPlist = void 0;
|
|
7
|
+
var _configPlugins = require("expo/config-plugins");
|
|
8
|
+
const withSurvicateIosInfoPlist = (config, props) => {
|
|
9
|
+
return (0, _configPlugins.withInfoPlist)(config, config => {
|
|
10
|
+
config.modResults.Survicate = {
|
|
11
|
+
WorkspaceKey: props.workspaceKey
|
|
12
|
+
};
|
|
13
|
+
return config;
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
exports.withSurvicateIosInfoPlist = withSurvicateIosInfoPlist;
|
|
17
|
+
//# sourceMappingURL=withSurvicateiOS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_configPlugins","require","withSurvicateIosInfoPlist","config","props","withInfoPlist","modResults","Survicate","WorkspaceKey","workspaceKey","exports"],"sourceRoot":"../../../src","sources":["expo/withSurvicateiOS.ts"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAGO,MAAMC,yBAA6D,GAAGA,CAACC,MAAM,EAAEC,KAA2B,KAAK;EAClH,OAAO,IAAAC,4BAAa,EAACF,MAAM,EAAGA,MAAM,IAAK;IACrCA,MAAM,CAACG,UAAU,CAACC,SAAS,GAAG;MAC5BC,YAAY,EAAEJ,KAAK,CAACK;IACtB,CAAC;IACD,OAAON,MAAM;EACjB,CAAC,CAAC;AACN,CAAC;AAACO,OAAA,CAAAR,yBAAA,GAAAA,yBAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["expo/types.ts"],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createRunOncePlugin } from "@expo/config-plugins";
|
|
2
|
+
import { withSurvicateAndroidManifest, withSurvicateAndroidMavenRepository } from "./withSurvicateAndroid";
|
|
3
|
+
import { withSurvicateIosInfoPlist } from "./withSurvicateiOS";
|
|
4
|
+
const withSurvicateReactNative = (config, props) => {
|
|
5
|
+
let newConfig = config;
|
|
6
|
+
newConfig = withSurvicateAndroidManifest(newConfig, props);
|
|
7
|
+
newConfig = withSurvicateAndroidMavenRepository(newConfig);
|
|
8
|
+
newConfig = withSurvicateIosInfoPlist(newConfig, props);
|
|
9
|
+
return newConfig;
|
|
10
|
+
};
|
|
11
|
+
const configPlugin = pkg => createRunOncePlugin(withSurvicateReactNative, pkg.name, pkg.version);
|
|
12
|
+
export default configPlugin;
|
|
13
|
+
//# sourceMappingURL=withSurvicate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createRunOncePlugin","withSurvicateAndroidManifest","withSurvicateAndroidMavenRepository","withSurvicateIosInfoPlist","withSurvicateReactNative","config","props","newConfig","configPlugin","pkg","name","version"],"sourceRoot":"../../../src","sources":["expo/withSurvicate.ts"],"mappings":"AAAA,SAAuBA,mBAAmB,QAAQ,sBAAsB;AAExE,SAASC,4BAA4B,EAAEC,mCAAmC,QAAQ,wBAAwB;AAC1G,SAASC,yBAAyB,QAAQ,oBAAoB;AAE9D,MAAMC,wBAA4D,GAAGA,CACnEC,MAAM,EACNC,KAAK,KACF;EACH,IAAIC,SAAS,GAAGF,MAAM;EACtBE,SAAS,GAAGN,4BAA4B,CAACM,SAAS,EAAED,KAAK,CAAC;EAC1DC,SAAS,GAAGL,mCAAmC,CAACK,SAAS,CAAC;EAC1DA,SAAS,GAAGJ,yBAAyB,CAACI,SAAS,EAAED,KAAK,CAAC;EACvD,OAAOC,SAAS;AAClB,CAAC;AAED,MAAMC,YAAY,GAAIC,GAAsC,IAC1DT,mBAAmB,CAACI,wBAAwB,EAAEK,GAAG,CAACC,IAAI,EAAED,GAAG,CAACE,OAAO,CAAC;AAEtE,eAAeH,YAAY"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { AndroidConfig, withAndroidManifest, withProjectBuildGradle } from "expo/config-plugins";
|
|
2
|
+
import { createGeneratedHeaderComment, removeGeneratedContents } from "@expo/config-plugins/build/utils/generateCode";
|
|
3
|
+
|
|
4
|
+
// Using helpers keeps error messages unified and helps cut down on XML format changes.
|
|
5
|
+
const {
|
|
6
|
+
addMetaDataItemToMainApplication,
|
|
7
|
+
getMainApplicationOrThrow
|
|
8
|
+
} = AndroidConfig.Manifest;
|
|
9
|
+
export const withSurvicateAndroidManifest = (config, props) => {
|
|
10
|
+
return withAndroidManifest(config, async config => {
|
|
11
|
+
// Modifiers can be async, but try to keep them fast.
|
|
12
|
+
config.modResults = await setCustomConfigAsync(config.modResults, props.workspaceKey);
|
|
13
|
+
return config;
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
async function setCustomConfigAsync(androidManifest, workspaceKey) {
|
|
17
|
+
// Get the <application /> tag and assert if it doesn't exist.
|
|
18
|
+
const mainApplication = getMainApplicationOrThrow(androidManifest);
|
|
19
|
+
addMetaDataItemToMainApplication(mainApplication,
|
|
20
|
+
// value for `android:name`
|
|
21
|
+
"com.survicate.surveys.workspaceKey",
|
|
22
|
+
// value for `android:value`
|
|
23
|
+
workspaceKey);
|
|
24
|
+
return androidManifest;
|
|
25
|
+
}
|
|
26
|
+
export const withSurvicateAndroidMavenRepository = config => {
|
|
27
|
+
return withProjectBuildGradle(config, async config => {
|
|
28
|
+
if (config.modResults.language !== "groovy") {
|
|
29
|
+
console.warn("Unsupported language for build.gradle. Only 'groovy' is supported.");
|
|
30
|
+
return config;
|
|
31
|
+
}
|
|
32
|
+
config.modResults.contents = await appendContents({
|
|
33
|
+
src: config.modResults.contents,
|
|
34
|
+
newSrc: `allprojects { repositories { maven { url 'https://repo.survicate.com' } } }`,
|
|
35
|
+
tag: "@survicate/react-native-survicate",
|
|
36
|
+
comment: "//"
|
|
37
|
+
}).contents;
|
|
38
|
+
return config;
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// Fork of config-plugins mergeContents, but appends the contents to the end of the file.
|
|
43
|
+
function appendContents({
|
|
44
|
+
src,
|
|
45
|
+
newSrc,
|
|
46
|
+
tag,
|
|
47
|
+
comment
|
|
48
|
+
}) {
|
|
49
|
+
const header = createGeneratedHeaderComment(newSrc, tag, comment);
|
|
50
|
+
if (!src.includes(header)) {
|
|
51
|
+
// Ensure the old generated contents are removed.
|
|
52
|
+
const sanitizedTarget = removeGeneratedContents(src, tag);
|
|
53
|
+
const contentsToAdd = [
|
|
54
|
+
// @something
|
|
55
|
+
header,
|
|
56
|
+
// contents
|
|
57
|
+
newSrc,
|
|
58
|
+
// @end
|
|
59
|
+
`${comment} @generated end ${tag}`].join("\n");
|
|
60
|
+
return {
|
|
61
|
+
contents: sanitizedTarget ?? src + contentsToAdd,
|
|
62
|
+
didMerge: true,
|
|
63
|
+
didClear: !!sanitizedTarget
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
contents: src,
|
|
68
|
+
didClear: false,
|
|
69
|
+
didMerge: false
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=withSurvicateAndroid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["AndroidConfig","withAndroidManifest","withProjectBuildGradle","createGeneratedHeaderComment","removeGeneratedContents","addMetaDataItemToMainApplication","getMainApplicationOrThrow","Manifest","withSurvicateAndroidManifest","config","props","modResults","setCustomConfigAsync","workspaceKey","androidManifest","mainApplication","withSurvicateAndroidMavenRepository","language","console","warn","contents","appendContents","src","newSrc","tag","comment","header","includes","sanitizedTarget","contentsToAdd","join","didMerge","didClear"],"sourceRoot":"../../../src","sources":["expo/withSurvicateAndroid.ts"],"mappings":"AAAA,SACEA,aAAa,EAEbC,mBAAmB,EACnBC,sBAAsB,QACjB,qBAAqB;AAG5B,SAEEC,4BAA4B,EAC5BC,uBAAuB,QAClB,+CAA+C;;AAEtD;AACA,MAAM;EAAEC,gCAAgC;EAAEC;AAA0B,CAAC,GACnEN,aAAa,CAACO,QAAQ;AAExB,OAAO,MAAMC,4BAEZ,GAAGA,CAACC,MAAkB,EAAEC,KAA2B,KAAK;EACvD,OAAOT,mBAAmB,CAACQ,MAAM,EAAE,MAAOA,MAAM,IAAK;IACnD;IACAA,MAAM,CAACE,UAAU,GAAG,MAAMC,oBAAoB,CAC5CH,MAAM,CAACE,UAAU,EACjBD,KAAK,CAACG,YACR,CAAC;IACD,OAAOJ,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;AAED,eAAeG,oBAAoBA,CACjCE,eAAuD,EACvDD,YAAoB,EAC6B;EACjD;EACA,MAAME,eAAe,GAAGT,yBAAyB,CAACQ,eAAe,CAAC;EAElET,gCAAgC,CAC9BU,eAAe;EACf;EACA,oCAAoC;EACpC;EACAF,YACF,CAAC;EAED,OAAOC,eAAe;AACxB;AAEA,OAAO,MAAME,mCAAiD,GAAIP,MAAM,IAAK;EAC3E,OAAOP,sBAAsB,CAACO,MAAM,EAAE,MAAOA,MAAM,IAAK;IACtD,IAAIA,MAAM,CAACE,UAAU,CAACM,QAAQ,KAAK,QAAQ,EAAE;MAC3CC,OAAO,CAACC,IAAI,CACV,oEACF,CAAC;MACD,OAAOV,MAAM;IACf;IAEAA,MAAM,CAACE,UAAU,CAACS,QAAQ,GAAG,MAAMC,cAAc,CAAC;MAChDC,GAAG,EAAEb,MAAM,CAACE,UAAU,CAACS,QAAQ;MAC/BG,MAAM,EAAG,6EAA4E;MACrFC,GAAG,EAAE,mCAAmC;MACxCC,OAAO,EAAE;IACX,CAAC,CAAC,CAACL,QAAQ;IACX,OAAOX,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AACA,SAASY,cAAcA,CAAC;EACtBC,GAAG;EACHC,MAAM;EACNC,GAAG;EACHC;AAMF,CAAC,EAAgB;EACf,MAAMC,MAAM,GAAGvB,4BAA4B,CAACoB,MAAM,EAAEC,GAAG,EAAEC,OAAO,CAAC;EACjE,IAAI,CAACH,GAAG,CAACK,QAAQ,CAACD,MAAM,CAAC,EAAE;IACzB;IACA,MAAME,eAAe,GAAGxB,uBAAuB,CAACkB,GAAG,EAAEE,GAAG,CAAC;IACzD,MAAMK,aAAa,GAAG;IACpB;IACAH,MAAM;IACN;IACAH,MAAM;IACN;IACC,GAAEE,OAAQ,mBAAkBD,GAAI,EAAC,CACnC,CAACM,IAAI,CAAC,IAAI,CAAC;IACZ,OAAO;MACLV,QAAQ,EAAEQ,eAAe,IAAIN,GAAG,GAAGO,aAAa;MAChDE,QAAQ,EAAE,IAAI;MACdC,QAAQ,EAAE,CAAC,CAACJ;IACd,CAAC;EACH;EACA,OAAO;IAAER,QAAQ,EAAEE,GAAG;IAAEU,QAAQ,EAAE,KAAK;IAAED,QAAQ,EAAE;EAAM,CAAC;AAC5D"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { withInfoPlist } from 'expo/config-plugins';
|
|
2
|
+
export const withSurvicateIosInfoPlist = (config, props) => {
|
|
3
|
+
return withInfoPlist(config, config => {
|
|
4
|
+
config.modResults.Survicate = {
|
|
5
|
+
WorkspaceKey: props.workspaceKey
|
|
6
|
+
};
|
|
7
|
+
return config;
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=withSurvicateiOS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["withInfoPlist","withSurvicateIosInfoPlist","config","props","modResults","Survicate","WorkspaceKey","workspaceKey"],"sourceRoot":"../../../src","sources":["expo/withSurvicateiOS.ts"],"mappings":"AAAA,SAAuBA,aAAa,QAAQ,qBAAqB;AAGjE,OAAO,MAAMC,yBAA6D,GAAGA,CAACC,MAAM,EAAEC,KAA2B,KAAK;EAClH,OAAOH,aAAa,CAACE,MAAM,EAAGA,MAAM,IAAK;IACrCA,MAAM,CAACE,UAAU,CAACC,SAAS,GAAG;MAC5BC,YAAY,EAAEH,KAAK,CAACI;IACtB,CAAC;IACD,OAAOL,MAAM;EACjB,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/expo/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAAG;IAC/B,YAAY,EAAE,MAAM,CAAA;CACvB,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ConfigPlugin } from "@expo/config-plugins";
|
|
2
|
+
import { SurvicatePluginProps } from "./types";
|
|
3
|
+
declare const configPlugin: (pkg: {
|
|
4
|
+
name: string;
|
|
5
|
+
version: string;
|
|
6
|
+
}) => ConfigPlugin<SurvicatePluginProps>;
|
|
7
|
+
export default configPlugin;
|
|
8
|
+
//# sourceMappingURL=withSurvicate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withSurvicate.d.ts","sourceRoot":"","sources":["../../../src/expo/withSurvicate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAe/C,QAAA,MAAM,YAAY,QAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,uCACU,CAAC;AAEvE,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ConfigPlugin } from "expo/config-plugins";
|
|
2
|
+
import { SurvicatePluginProps } from "./types";
|
|
3
|
+
export declare const withSurvicateAndroidManifest: ConfigPlugin<SurvicatePluginProps>;
|
|
4
|
+
export declare const withSurvicateAndroidMavenRepository: ConfigPlugin;
|
|
5
|
+
//# sourceMappingURL=withSurvicateAndroid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withSurvicateAndroid.d.ts","sourceRoot":"","sources":["../../../src/expo/withSurvicateAndroid.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EAGb,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAW/C,eAAO,MAAM,4BAA4B,EAAE,YAAY,CACrD,oBAAoB,CAUrB,CAAC;AAoBF,eAAO,MAAM,mCAAmC,EAAE,YAiBjD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withSurvicateiOS.d.ts","sourceRoot":"","sources":["../../../src/expo/withSurvicateiOS.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAiB,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAC,oBAAoB,EAAC,MAAM,SAAS,CAAC;AAE7C,eAAO,MAAM,yBAAyB,EAAE,YAAY,CAAC,oBAAoB,CAOxE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@survicate/react-native-survicate",
|
|
3
3
|
"title": "React Native Survicate Bindings",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.2.0",
|
|
5
5
|
"description": "React Native bindings for Survicate Mobile SDK",
|
|
6
6
|
"main": "lib/commonjs/index.js",
|
|
7
7
|
"module": "lib/module/index.js",
|
|
@@ -13,12 +13,19 @@
|
|
|
13
13
|
"lib",
|
|
14
14
|
"android",
|
|
15
15
|
"ios",
|
|
16
|
+
"cpp",
|
|
17
|
+
"app.plugin.js",
|
|
16
18
|
"react-native-survicate.podspec",
|
|
17
19
|
"!android/build",
|
|
18
20
|
"!ios/build",
|
|
21
|
+
"!android/gradle",
|
|
22
|
+
"!android/gradlew",
|
|
23
|
+
"!android/gradlew.bat",
|
|
24
|
+
"!android/local.properties",
|
|
19
25
|
"!**/__tests__",
|
|
20
26
|
"!**/__fixtures__",
|
|
21
|
-
"!**/__mocks__"
|
|
27
|
+
"!**/__mocks__",
|
|
28
|
+
"!**/.*"
|
|
22
29
|
],
|
|
23
30
|
"scripts": {
|
|
24
31
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -31,24 +38,32 @@
|
|
|
31
38
|
"baseUrl": "https://github.com/Survicate/survicate-react-native-sdk"
|
|
32
39
|
},
|
|
33
40
|
"keywords": [
|
|
34
|
-
"react-native"
|
|
41
|
+
"react-native",
|
|
42
|
+
"expo"
|
|
35
43
|
],
|
|
36
|
-
"author":
|
|
37
|
-
"name": "Survicate",
|
|
38
|
-
"email": "help@survicate.com"
|
|
39
|
-
},
|
|
44
|
+
"author": "Survicate <hello@survicate.com> (https://survicate.com/)",
|
|
40
45
|
"license": "MIT",
|
|
41
46
|
"licenseFilename": "LICENSE",
|
|
42
47
|
"readmeFilename": "README.md",
|
|
48
|
+
"bugs": {
|
|
49
|
+
"url": "https://survicate.com"
|
|
50
|
+
},
|
|
43
51
|
"peerDependencies": {
|
|
52
|
+
"expo": ">=49",
|
|
44
53
|
"react": ">=16.8.6",
|
|
45
54
|
"react-native": ">=0.60.0"
|
|
46
55
|
},
|
|
56
|
+
"peerDependenciesMeta": {
|
|
57
|
+
"expo": {
|
|
58
|
+
"optional": true
|
|
59
|
+
}
|
|
60
|
+
},
|
|
47
61
|
"devDependencies": {
|
|
48
62
|
"@tsconfig/react-native": "^3.0.2",
|
|
49
63
|
"@types/jest": "^29.5.4",
|
|
50
64
|
"@types/react": "^18.2.21",
|
|
51
65
|
"@types/react-test-renderer": "^18.0.1",
|
|
66
|
+
"expo": "^50.0.11",
|
|
52
67
|
"react": "18.2.0",
|
|
53
68
|
"react-native": "0.72.6",
|
|
54
69
|
"react-native-builder-bob": "^0.23.1",
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ConfigPlugin, createRunOncePlugin } from "@expo/config-plugins";
|
|
2
|
+
import { SurvicatePluginProps } from "./types";
|
|
3
|
+
import { withSurvicateAndroidManifest, withSurvicateAndroidMavenRepository } from "./withSurvicateAndroid";
|
|
4
|
+
import { withSurvicateIosInfoPlist } from "./withSurvicateiOS";
|
|
5
|
+
|
|
6
|
+
const withSurvicateReactNative: ConfigPlugin<SurvicatePluginProps> = (
|
|
7
|
+
config,
|
|
8
|
+
props
|
|
9
|
+
) => {
|
|
10
|
+
let newConfig = config;
|
|
11
|
+
newConfig = withSurvicateAndroidManifest(newConfig, props);
|
|
12
|
+
newConfig = withSurvicateAndroidMavenRepository(newConfig);
|
|
13
|
+
newConfig = withSurvicateIosInfoPlist(newConfig, props);
|
|
14
|
+
return newConfig;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const configPlugin = (pkg: { name: string; version: string }) =>
|
|
18
|
+
createRunOncePlugin(withSurvicateReactNative, pkg.name, pkg.version);
|
|
19
|
+
|
|
20
|
+
export default configPlugin;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AndroidConfig,
|
|
3
|
+
ConfigPlugin,
|
|
4
|
+
withAndroidManifest,
|
|
5
|
+
withProjectBuildGradle,
|
|
6
|
+
} from "expo/config-plugins";
|
|
7
|
+
import { ExpoConfig } from "expo/config";
|
|
8
|
+
import { SurvicatePluginProps } from "./types";
|
|
9
|
+
import {
|
|
10
|
+
MergeResults,
|
|
11
|
+
createGeneratedHeaderComment,
|
|
12
|
+
removeGeneratedContents,
|
|
13
|
+
} from "@expo/config-plugins/build/utils/generateCode";
|
|
14
|
+
|
|
15
|
+
// Using helpers keeps error messages unified and helps cut down on XML format changes.
|
|
16
|
+
const { addMetaDataItemToMainApplication, getMainApplicationOrThrow } =
|
|
17
|
+
AndroidConfig.Manifest;
|
|
18
|
+
|
|
19
|
+
export const withSurvicateAndroidManifest: ConfigPlugin<
|
|
20
|
+
SurvicatePluginProps
|
|
21
|
+
> = (config: ExpoConfig, props: SurvicatePluginProps) => {
|
|
22
|
+
return withAndroidManifest(config, async (config) => {
|
|
23
|
+
// Modifiers can be async, but try to keep them fast.
|
|
24
|
+
config.modResults = await setCustomConfigAsync(
|
|
25
|
+
config.modResults,
|
|
26
|
+
props.workspaceKey
|
|
27
|
+
);
|
|
28
|
+
return config;
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
async function setCustomConfigAsync(
|
|
33
|
+
androidManifest: AndroidConfig.Manifest.AndroidManifest,
|
|
34
|
+
workspaceKey: string
|
|
35
|
+
): Promise<AndroidConfig.Manifest.AndroidManifest> {
|
|
36
|
+
// Get the <application /> tag and assert if it doesn't exist.
|
|
37
|
+
const mainApplication = getMainApplicationOrThrow(androidManifest);
|
|
38
|
+
|
|
39
|
+
addMetaDataItemToMainApplication(
|
|
40
|
+
mainApplication,
|
|
41
|
+
// value for `android:name`
|
|
42
|
+
"com.survicate.surveys.workspaceKey",
|
|
43
|
+
// value for `android:value`
|
|
44
|
+
workspaceKey
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
return androidManifest;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export const withSurvicateAndroidMavenRepository: ConfigPlugin = (config) => {
|
|
51
|
+
return withProjectBuildGradle(config, async (config) => {
|
|
52
|
+
if (config.modResults.language !== "groovy") {
|
|
53
|
+
console.warn(
|
|
54
|
+
"Unsupported language for build.gradle. Only 'groovy' is supported."
|
|
55
|
+
);
|
|
56
|
+
return config;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
config.modResults.contents = await appendContents({
|
|
60
|
+
src: config.modResults.contents,
|
|
61
|
+
newSrc: `allprojects { repositories { maven { url 'https://repo.survicate.com' } } }`,
|
|
62
|
+
tag: "@survicate/react-native-survicate",
|
|
63
|
+
comment: "//",
|
|
64
|
+
}).contents;
|
|
65
|
+
return config;
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
// Fork of config-plugins mergeContents, but appends the contents to the end of the file.
|
|
70
|
+
function appendContents({
|
|
71
|
+
src,
|
|
72
|
+
newSrc,
|
|
73
|
+
tag,
|
|
74
|
+
comment,
|
|
75
|
+
}: {
|
|
76
|
+
src: string;
|
|
77
|
+
newSrc: string;
|
|
78
|
+
tag: string;
|
|
79
|
+
comment: string;
|
|
80
|
+
}): MergeResults {
|
|
81
|
+
const header = createGeneratedHeaderComment(newSrc, tag, comment);
|
|
82
|
+
if (!src.includes(header)) {
|
|
83
|
+
// Ensure the old generated contents are removed.
|
|
84
|
+
const sanitizedTarget = removeGeneratedContents(src, tag);
|
|
85
|
+
const contentsToAdd = [
|
|
86
|
+
// @something
|
|
87
|
+
header,
|
|
88
|
+
// contents
|
|
89
|
+
newSrc,
|
|
90
|
+
// @end
|
|
91
|
+
`${comment} @generated end ${tag}`,
|
|
92
|
+
].join("\n");
|
|
93
|
+
return {
|
|
94
|
+
contents: sanitizedTarget ?? src + contentsToAdd,
|
|
95
|
+
didMerge: true,
|
|
96
|
+
didClear: !!sanitizedTarget,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
return { contents: src, didClear: false, didMerge: false };
|
|
100
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ConfigPlugin, withInfoPlist } from 'expo/config-plugins';
|
|
2
|
+
import {SurvicatePluginProps} from './types';
|
|
3
|
+
|
|
4
|
+
export const withSurvicateIosInfoPlist: ConfigPlugin<SurvicatePluginProps> = (config, props: SurvicatePluginProps) => {
|
|
5
|
+
return withInfoPlist(config, (config) => {
|
|
6
|
+
config.modResults.Survicate = {
|
|
7
|
+
WorkspaceKey: props.workspaceKey,
|
|
8
|
+
};
|
|
9
|
+
return config;
|
|
10
|
+
});
|
|
11
|
+
};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
package/android/.idea/gradle.xml
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="GradleMigrationSettings" migrationVersion="1" />
|
|
4
|
-
<component name="GradleSettings">
|
|
5
|
-
<option name="linkedExternalProjectsSettings">
|
|
6
|
-
<GradleProjectSettings>
|
|
7
|
-
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
|
8
|
-
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
|
9
|
-
<option name="modules">
|
|
10
|
-
<set>
|
|
11
|
-
<option value="$PROJECT_DIR$" />
|
|
12
|
-
</set>
|
|
13
|
-
</option>
|
|
14
|
-
<option name="resolveExternalAnnotations" value="false" />
|
|
15
|
-
</GradleProjectSettings>
|
|
16
|
-
</option>
|
|
17
|
-
</component>
|
|
18
|
-
</project>
|
package/android/.idea/misc.xml
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<project version="4">
|
|
2
|
-
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
|
3
|
-
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
|
|
4
|
-
<output url="file://$PROJECT_DIR$/build/classes" />
|
|
5
|
-
</component>
|
|
6
|
-
<component name="ProjectType">
|
|
7
|
-
<option name="id" value="Android" />
|
|
8
|
-
</component>
|
|
9
|
-
</project>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
i
|
|
3
|
-
9src/oldarch/java/com/survicate/react/SurvicateModule.java,6/1/61130b71a87185f8a73a14cbce1419badde70d8b
|
|
4
|
-
j
|
|
5
|
-
:src/main/java/com/survicate/react/SurvicateModuleImpl.java,0/d/0df9aa085b7b8db1dccfbc855a1ace7351a87b1f
|
|
6
|
-
<
|
|
7
|
-
build.gradle,f/0/f07866736216be0ee2aba49e392191aeae700a35
|
|
8
|
-
o
|
|
9
|
-
?src/main/java/com/survicate/react/SurvicateRNEventListener.java,5/9/590364a981f27a7c9f1304f29901ba5f8b10c7bb
|
|
10
|
-
g
|
|
11
|
-
7src/main/java/com/survicate/react/SurvicatePackage.java,3/4/348c0bbc5ca5287a00a390486ca37dd7b380944a
|
package/android/.idea/sonarlint/securityhotspotstore/0/d/0df9aa085b7b8db1dccfbc855a1ace7351a87b1f
DELETED
|
File without changes
|
package/android/.idea/sonarlint/securityhotspotstore/3/4/348c0bbc5ca5287a00a390486ca37dd7b380944a
DELETED
|
File without changes
|
package/android/.idea/sonarlint/securityhotspotstore/5/9/590364a981f27a7c9f1304f29901ba5f8b10c7bb
DELETED
|
File without changes
|
package/android/.idea/sonarlint/securityhotspotstore/6/1/61130b71a87185f8a73a14cbce1419badde70d8b
DELETED
|
File without changes
|
package/android/.idea/sonarlint/securityhotspotstore/f/0/f07866736216be0ee2aba49e392191aeae700a35
DELETED
|
File without changes
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
i
|
|
3
|
-
9src/oldarch/java/com/survicate/react/SurvicateModule.java,6/1/61130b71a87185f8a73a14cbce1419badde70d8b
|
|
4
|
-
j
|
|
5
|
-
:src/main/java/com/survicate/react/SurvicateModuleImpl.java,0/d/0df9aa085b7b8db1dccfbc855a1ace7351a87b1f
|
|
6
|
-
<
|
|
7
|
-
build.gradle,f/0/f07866736216be0ee2aba49e392191aeae700a35
|
|
8
|
-
o
|
|
9
|
-
?src/main/java/com/survicate/react/SurvicateRNEventListener.java,5/9/590364a981f27a7c9f1304f29901ba5f8b10c7bb
|
|
10
|
-
g
|
|
11
|
-
7src/main/java/com/survicate/react/SurvicatePackage.java,3/4/348c0bbc5ca5287a00a390486ca37dd7b380944a
|
package/android/.idea/vcs.xml
DELETED
|
Binary file
|
package/android/gradlew
DELETED
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
|
|
3
|
-
#
|
|
4
|
-
# Copyright © 2015-2021 the original authors.
|
|
5
|
-
#
|
|
6
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
# you may not use this file except in compliance with the License.
|
|
8
|
-
# You may obtain a copy of the License at
|
|
9
|
-
#
|
|
10
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
#
|
|
12
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
-
# See the License for the specific language governing permissions and
|
|
16
|
-
# limitations under the License.
|
|
17
|
-
#
|
|
18
|
-
|
|
19
|
-
##############################################################################
|
|
20
|
-
#
|
|
21
|
-
# Gradle start up script for POSIX generated by Gradle.
|
|
22
|
-
#
|
|
23
|
-
# Important for running:
|
|
24
|
-
#
|
|
25
|
-
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
|
26
|
-
# noncompliant, but you have some other compliant shell such as ksh or
|
|
27
|
-
# bash, then to run this script, type that shell name before the whole
|
|
28
|
-
# command line, like:
|
|
29
|
-
#
|
|
30
|
-
# ksh Gradle
|
|
31
|
-
#
|
|
32
|
-
# Busybox and similar reduced shells will NOT work, because this script
|
|
33
|
-
# requires all of these POSIX shell features:
|
|
34
|
-
# * functions;
|
|
35
|
-
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
|
36
|
-
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
|
37
|
-
# * compound commands having a testable exit status, especially «case»;
|
|
38
|
-
# * various built-in commands including «command», «set», and «ulimit».
|
|
39
|
-
#
|
|
40
|
-
# Important for patching:
|
|
41
|
-
#
|
|
42
|
-
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
|
43
|
-
# by Bash, Ksh, etc; in particular arrays are avoided.
|
|
44
|
-
#
|
|
45
|
-
# The "traditional" practice of packing multiple parameters into a
|
|
46
|
-
# space-separated string is a well documented source of bugs and security
|
|
47
|
-
# problems, so this is (mostly) avoided, by progressively accumulating
|
|
48
|
-
# options in "$@", and eventually passing that to Java.
|
|
49
|
-
#
|
|
50
|
-
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
|
51
|
-
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
|
52
|
-
# see the in-line comments for details.
|
|
53
|
-
#
|
|
54
|
-
# There are tweaks for specific operating systems such as AIX, CygWin,
|
|
55
|
-
# Darwin, MinGW, and NonStop.
|
|
56
|
-
#
|
|
57
|
-
# (3) This script is generated from the Groovy template
|
|
58
|
-
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
|
59
|
-
# within the Gradle project.
|
|
60
|
-
#
|
|
61
|
-
# You can find Gradle at https://github.com/gradle/gradle/.
|
|
62
|
-
#
|
|
63
|
-
##############################################################################
|
|
64
|
-
|
|
65
|
-
# Attempt to set APP_HOME
|
|
66
|
-
|
|
67
|
-
# Resolve links: $0 may be a link
|
|
68
|
-
app_path=$0
|
|
69
|
-
|
|
70
|
-
# Need this for daisy-chained symlinks.
|
|
71
|
-
while
|
|
72
|
-
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
|
73
|
-
[ -h "$app_path" ]
|
|
74
|
-
do
|
|
75
|
-
ls=$( ls -ld "$app_path" )
|
|
76
|
-
link=${ls#*' -> '}
|
|
77
|
-
case $link in #(
|
|
78
|
-
/*) app_path=$link ;; #(
|
|
79
|
-
*) app_path=$APP_HOME$link ;;
|
|
80
|
-
esac
|
|
81
|
-
done
|
|
82
|
-
|
|
83
|
-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
|
84
|
-
|
|
85
|
-
APP_NAME="Gradle"
|
|
86
|
-
APP_BASE_NAME=${0##*/}
|
|
87
|
-
|
|
88
|
-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
89
|
-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
90
|
-
|
|
91
|
-
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
|
92
|
-
MAX_FD=maximum
|
|
93
|
-
|
|
94
|
-
warn () {
|
|
95
|
-
echo "$*"
|
|
96
|
-
} >&2
|
|
97
|
-
|
|
98
|
-
die () {
|
|
99
|
-
echo
|
|
100
|
-
echo "$*"
|
|
101
|
-
echo
|
|
102
|
-
exit 1
|
|
103
|
-
} >&2
|
|
104
|
-
|
|
105
|
-
# OS specific support (must be 'true' or 'false').
|
|
106
|
-
cygwin=false
|
|
107
|
-
msys=false
|
|
108
|
-
darwin=false
|
|
109
|
-
nonstop=false
|
|
110
|
-
case "$( uname )" in #(
|
|
111
|
-
CYGWIN* ) cygwin=true ;; #(
|
|
112
|
-
Darwin* ) darwin=true ;; #(
|
|
113
|
-
MSYS* | MINGW* ) msys=true ;; #(
|
|
114
|
-
NONSTOP* ) nonstop=true ;;
|
|
115
|
-
esac
|
|
116
|
-
|
|
117
|
-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
# Determine the Java command to use to start the JVM.
|
|
121
|
-
if [ -n "$JAVA_HOME" ] ; then
|
|
122
|
-
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
|
123
|
-
# IBM's JDK on AIX uses strange locations for the executables
|
|
124
|
-
JAVACMD=$JAVA_HOME/jre/sh/java
|
|
125
|
-
else
|
|
126
|
-
JAVACMD=$JAVA_HOME/bin/java
|
|
127
|
-
fi
|
|
128
|
-
if [ ! -x "$JAVACMD" ] ; then
|
|
129
|
-
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
|
130
|
-
|
|
131
|
-
Please set the JAVA_HOME variable in your environment to match the
|
|
132
|
-
location of your Java installation."
|
|
133
|
-
fi
|
|
134
|
-
else
|
|
135
|
-
JAVACMD=java
|
|
136
|
-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
137
|
-
|
|
138
|
-
Please set the JAVA_HOME variable in your environment to match the
|
|
139
|
-
location of your Java installation."
|
|
140
|
-
fi
|
|
141
|
-
|
|
142
|
-
# Increase the maximum file descriptors if we can.
|
|
143
|
-
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|
144
|
-
case $MAX_FD in #(
|
|
145
|
-
max*)
|
|
146
|
-
MAX_FD=$( ulimit -H -n ) ||
|
|
147
|
-
warn "Could not query maximum file descriptor limit"
|
|
148
|
-
esac
|
|
149
|
-
case $MAX_FD in #(
|
|
150
|
-
'' | soft) :;; #(
|
|
151
|
-
*)
|
|
152
|
-
ulimit -n "$MAX_FD" ||
|
|
153
|
-
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
|
154
|
-
esac
|
|
155
|
-
fi
|
|
156
|
-
|
|
157
|
-
# Collect all arguments for the java command, stacking in reverse order:
|
|
158
|
-
# * args from the command line
|
|
159
|
-
# * the main class name
|
|
160
|
-
# * -classpath
|
|
161
|
-
# * -D...appname settings
|
|
162
|
-
# * --module-path (only if needed)
|
|
163
|
-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
|
164
|
-
|
|
165
|
-
# For Cygwin or MSYS, switch paths to Windows format before running java
|
|
166
|
-
if "$cygwin" || "$msys" ; then
|
|
167
|
-
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
|
168
|
-
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
|
169
|
-
|
|
170
|
-
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
|
171
|
-
|
|
172
|
-
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
|
173
|
-
for arg do
|
|
174
|
-
if
|
|
175
|
-
case $arg in #(
|
|
176
|
-
-*) false ;; # don't mess with options #(
|
|
177
|
-
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
|
178
|
-
[ -e "$t" ] ;; #(
|
|
179
|
-
*) false ;;
|
|
180
|
-
esac
|
|
181
|
-
then
|
|
182
|
-
arg=$( cygpath --path --ignore --mixed "$arg" )
|
|
183
|
-
fi
|
|
184
|
-
# Roll the args list around exactly as many times as the number of
|
|
185
|
-
# args, so each arg winds up back in the position where it started, but
|
|
186
|
-
# possibly modified.
|
|
187
|
-
#
|
|
188
|
-
# NB: a `for` loop captures its iteration list before it begins, so
|
|
189
|
-
# changing the positional parameters here affects neither the number of
|
|
190
|
-
# iterations, nor the values presented in `arg`.
|
|
191
|
-
shift # remove old arg
|
|
192
|
-
set -- "$@" "$arg" # push replacement arg
|
|
193
|
-
done
|
|
194
|
-
fi
|
|
195
|
-
|
|
196
|
-
# Collect all arguments for the java command;
|
|
197
|
-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
|
198
|
-
# shell script including quotes and variable substitutions, so put them in
|
|
199
|
-
# double quotes to make sure that they get re-expanded; and
|
|
200
|
-
# * put everything else in single quotes, so that it's not re-expanded.
|
|
201
|
-
|
|
202
|
-
set -- \
|
|
203
|
-
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
|
204
|
-
-classpath "$CLASSPATH" \
|
|
205
|
-
org.gradle.wrapper.GradleWrapperMain \
|
|
206
|
-
"$@"
|
|
207
|
-
|
|
208
|
-
# Stop when "xargs" is not available.
|
|
209
|
-
if ! command -v xargs >/dev/null 2>&1
|
|
210
|
-
then
|
|
211
|
-
die "xargs is not available"
|
|
212
|
-
fi
|
|
213
|
-
|
|
214
|
-
# Use "xargs" to parse quoted args.
|
|
215
|
-
#
|
|
216
|
-
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
|
217
|
-
#
|
|
218
|
-
# In Bash we could simply go:
|
|
219
|
-
#
|
|
220
|
-
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
|
221
|
-
# set -- "${ARGS[@]}" "$@"
|
|
222
|
-
#
|
|
223
|
-
# but POSIX shell has neither arrays nor command substitution, so instead we
|
|
224
|
-
# post-process each arg (as a line of input to sed) to backslash-escape any
|
|
225
|
-
# character that might be a shell metacharacter, then use eval to reverse
|
|
226
|
-
# that process (while maintaining the separation between arguments), and wrap
|
|
227
|
-
# the whole thing up as a single "set" statement.
|
|
228
|
-
#
|
|
229
|
-
# This will of course break if any of these variables contains a newline or
|
|
230
|
-
# an unmatched quote.
|
|
231
|
-
#
|
|
232
|
-
|
|
233
|
-
eval "set -- $(
|
|
234
|
-
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
|
235
|
-
xargs -n1 |
|
|
236
|
-
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
|
237
|
-
tr '\n' ' '
|
|
238
|
-
)" '"$@"'
|
|
239
|
-
|
|
240
|
-
exec "$JAVACMD" "$@"
|
package/android/gradlew.bat
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
@rem
|
|
2
|
-
@rem Copyright 2015 the original author or authors.
|
|
3
|
-
@rem
|
|
4
|
-
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
@rem you may not use this file except in compliance with the License.
|
|
6
|
-
@rem You may obtain a copy of the License at
|
|
7
|
-
@rem
|
|
8
|
-
@rem https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
@rem
|
|
10
|
-
@rem Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
@rem See the License for the specific language governing permissions and
|
|
14
|
-
@rem limitations under the License.
|
|
15
|
-
@rem
|
|
16
|
-
|
|
17
|
-
@if "%DEBUG%"=="" @echo off
|
|
18
|
-
@rem ##########################################################################
|
|
19
|
-
@rem
|
|
20
|
-
@rem Gradle startup script for Windows
|
|
21
|
-
@rem
|
|
22
|
-
@rem ##########################################################################
|
|
23
|
-
|
|
24
|
-
@rem Set local scope for the variables with windows NT shell
|
|
25
|
-
if "%OS%"=="Windows_NT" setlocal
|
|
26
|
-
|
|
27
|
-
set DIRNAME=%~dp0
|
|
28
|
-
if "%DIRNAME%"=="" set DIRNAME=.
|
|
29
|
-
set APP_BASE_NAME=%~n0
|
|
30
|
-
set APP_HOME=%DIRNAME%
|
|
31
|
-
|
|
32
|
-
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
|
33
|
-
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
|
34
|
-
|
|
35
|
-
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
36
|
-
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
|
37
|
-
|
|
38
|
-
@rem Find java.exe
|
|
39
|
-
if defined JAVA_HOME goto findJavaFromJavaHome
|
|
40
|
-
|
|
41
|
-
set JAVA_EXE=java.exe
|
|
42
|
-
%JAVA_EXE% -version >NUL 2>&1
|
|
43
|
-
if %ERRORLEVEL% equ 0 goto execute
|
|
44
|
-
|
|
45
|
-
echo.
|
|
46
|
-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
47
|
-
echo.
|
|
48
|
-
echo Please set the JAVA_HOME variable in your environment to match the
|
|
49
|
-
echo location of your Java installation.
|
|
50
|
-
|
|
51
|
-
goto fail
|
|
52
|
-
|
|
53
|
-
:findJavaFromJavaHome
|
|
54
|
-
set JAVA_HOME=%JAVA_HOME:"=%
|
|
55
|
-
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
|
56
|
-
|
|
57
|
-
if exist "%JAVA_EXE%" goto execute
|
|
58
|
-
|
|
59
|
-
echo.
|
|
60
|
-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
|
61
|
-
echo.
|
|
62
|
-
echo Please set the JAVA_HOME variable in your environment to match the
|
|
63
|
-
echo location of your Java installation.
|
|
64
|
-
|
|
65
|
-
goto fail
|
|
66
|
-
|
|
67
|
-
:execute
|
|
68
|
-
@rem Setup the command line
|
|
69
|
-
|
|
70
|
-
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
@rem Execute Gradle
|
|
74
|
-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
|
75
|
-
|
|
76
|
-
:end
|
|
77
|
-
@rem End local scope for the variables with windows NT shell
|
|
78
|
-
if %ERRORLEVEL% equ 0 goto mainEnd
|
|
79
|
-
|
|
80
|
-
:fail
|
|
81
|
-
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
|
82
|
-
rem the _cmd.exe /c_ return code!
|
|
83
|
-
set EXIT_CODE=%ERRORLEVEL%
|
|
84
|
-
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
|
85
|
-
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
|
86
|
-
exit /b %EXIT_CODE%
|
|
87
|
-
|
|
88
|
-
:mainEnd
|
|
89
|
-
if "%OS%"=="Windows_NT" endlocal
|
|
90
|
-
|
|
91
|
-
:omega
|
package/android/local.properties
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
## This file must *NOT* be checked into Version Control Systems,
|
|
2
|
-
# as it contains information specific to your local configuration.
|
|
3
|
-
#
|
|
4
|
-
# Location of the SDK. This is only used by Gradle.
|
|
5
|
-
# For customization when using a Version Control System, please read the
|
|
6
|
-
# header note.
|
|
7
|
-
#Thu Jan 25 11:41:28 CET 2024
|
|
8
|
-
sdk.dir=/Users/pawelgodlewski/Library/Android/sdk
|