@capacitor/background-runner 1.0.1-dev-20230721T105145.0 → 1.0.1-dev-20230725T192430.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.
@@ -43,8 +43,8 @@ android {
43
43
  abortOnError false
44
44
  }
45
45
  compileOptions {
46
- sourceCompatibility JavaVersion.VERSION_11
47
- targetCompatibility JavaVersion.VERSION_11
46
+ sourceCompatibility JavaVersion.VERSION_17
47
+ targetCompatibility JavaVersion.VERSION_17
48
48
  }
49
49
  }
50
50
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/background-runner",
3
- "version": "1.0.1-dev-20230721T105145.0",
3
+ "version": "1.0.1-dev-20230725T192430.0",
4
4
  "description": "Capacitor Background Runner",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -79,5 +79,5 @@
79
79
  "src": "android"
80
80
  }
81
81
  },
82
- "gitHead": "93219258eb254c84e386f0efaa6327f4be0ef3f8"
82
+ "gitHead": "5844d0c814378b9c4ebafe752c297d7110e8c2ba"
83
83
  }
@@ -1,23 +1,30 @@
1
- const fs = require("fs");
1
+ const fs = require('fs');
2
2
  const path = require('path');
3
3
 
4
- console.log(process.env.INIT_CWD);
5
-
6
4
  let workingDir = process.env.INIT_CWD;
7
5
  if (!workingDir) {
8
- workingDir = ".";
6
+ workingDir = '.';
9
7
  }
10
8
 
11
- if (!fs.existsSync(path.join(workingDir, "android"))) {
12
- throw new Error("cannot install android-js-engine library, not in correct parent directory.");
9
+ if (!fs.existsSync(path.join(workingDir, 'android'))) {
10
+ console.warn(
11
+ 'cannot install android-js-engine library: @capacitor/android not installed, or in wrong parent directory.',
12
+ );
13
+ return;
13
14
  }
14
15
 
15
- const releaseAARPath = path.join("android/src/main/libs/android-js-engine-release.aar");
16
-
17
- const fullPath = path.join(workingDir, "android/app/libs")
18
- fs.mkdirSync(fullPath);
19
- fs.copyFileSync(releaseAARPath, path.join(fullPath, "android-js-engine-release.aar"))
16
+ const releaseAARPath = path.join(
17
+ 'android/src/main/libs/android-js-engine-release.aar',
18
+ );
20
19
 
21
- console.log(`copied android-js-engine-release.aar to ${fullPath}`)
20
+ const fullPath = path.join(workingDir, 'android/app/libs');
21
+ if (!fs.existsSync(fullPath)) {
22
+ fs.mkdirSync(fullPath);
23
+ }
22
24
 
25
+ fs.copyFileSync(
26
+ releaseAARPath,
27
+ path.join(fullPath, 'android-js-engine-release.aar'),
28
+ );
23
29
 
30
+ console.log(`copied android-js-engine-release.aar to ${fullPath}`);