@capacitor/background-runner 3.1.0-dev.20260901T105544 → 3.1.0-dev.20260916T095625
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.
|
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
|
|
|
11
11
|
s.author = package['author']
|
|
12
12
|
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
|
|
13
13
|
s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
|
-
s.ios.deployment_target
|
|
14
|
+
s.ios.deployment_target = '16.0'
|
|
15
15
|
s.dependency 'Capacitor'
|
|
16
16
|
s.swift_version = '5.1'
|
|
17
17
|
end
|
package/Package.swift
CHANGED
|
@@ -5,7 +5,7 @@ import PackageDescription
|
|
|
5
5
|
|
|
6
6
|
let package = Package(
|
|
7
7
|
name: "CapacitorBackgroundRunner",
|
|
8
|
-
platforms: [.iOS(.
|
|
8
|
+
platforms: [.iOS(.v16), .macOS(.v13)],
|
|
9
9
|
products: [
|
|
10
10
|
// Products define the executables and libraries a package produces, making them visible to other packages.
|
|
11
11
|
.library(
|
|
@@ -14,7 +14,7 @@ let package = Package(
|
|
|
14
14
|
)
|
|
15
15
|
],
|
|
16
16
|
dependencies: [
|
|
17
|
-
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "
|
|
17
|
+
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "9.0.0-alpha.5")
|
|
18
18
|
],
|
|
19
19
|
targets: [
|
|
20
20
|
// Targets are the basic building blocks of a package, defining a module or a test suite.
|
|
@@ -23,7 +23,6 @@ let package = Package(
|
|
|
23
23
|
name: "CapacitorBackgroundRunner",
|
|
24
24
|
dependencies: [
|
|
25
25
|
.product(name: "Capacitor", package: "capacitor-swift-pm"),
|
|
26
|
-
.product(name: "Cordova", package: "capacitor-swift-pm"),
|
|
27
26
|
"RunnerEngine"
|
|
28
27
|
],
|
|
29
28
|
path: "ios/Sources/CapacitorBackgroundRunner"
|
package/android/build.gradle
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
ext {
|
|
2
2
|
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
|
|
3
3
|
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.1'
|
|
4
|
-
|
|
4
|
+
androidxCoreVersion = project.hasProperty('androidxCoreVersion') ? rootProject.ext.androidxCoreVersion : '1.19.0'
|
|
5
5
|
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.3.0'
|
|
6
6
|
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.7.0'
|
|
7
7
|
workManagerVersion = project.hasProperty('workManagerVersion') ? rootProject.ext.workManagerVersion : '2.11.0'
|
|
@@ -9,27 +9,23 @@ ext {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
buildscript {
|
|
12
|
-
ext.kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : '2.2.20'
|
|
13
12
|
repositories {
|
|
14
13
|
google()
|
|
15
14
|
mavenCentral()
|
|
16
15
|
}
|
|
17
16
|
dependencies {
|
|
18
|
-
classpath 'com.android.tools.build:gradle:
|
|
19
|
-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
17
|
+
classpath 'com.android.tools.build:gradle:9.2.1'
|
|
20
18
|
|
|
21
19
|
}
|
|
22
20
|
}
|
|
23
21
|
|
|
24
22
|
apply plugin: 'com.android.library'
|
|
25
|
-
apply plugin: 'org.jetbrains.kotlin.android'
|
|
26
23
|
|
|
27
24
|
android {
|
|
28
25
|
namespace = "com.capacitorjs.plugins.backgroundrunner"
|
|
29
|
-
compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion :
|
|
26
|
+
compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 37
|
|
30
27
|
defaultConfig {
|
|
31
|
-
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion :
|
|
32
|
-
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 36
|
|
28
|
+
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 26
|
|
33
29
|
versionCode 1
|
|
34
30
|
versionName "1.0"
|
|
35
31
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
@@ -61,10 +57,10 @@ repositories {
|
|
|
61
57
|
dependencies {
|
|
62
58
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
63
59
|
implementation project(':capacitor-android')
|
|
64
|
-
implementation
|
|
60
|
+
implementation ":android-js-engine-release@aar"
|
|
65
61
|
implementation "androidx.work:work-runtime-ktx:$workManagerVersion"
|
|
66
62
|
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
67
|
-
implementation "androidx.core:core
|
|
63
|
+
implementation "androidx.core:core:$androidxCoreVersion"
|
|
68
64
|
testImplementation "junit:junit:$junitVersion"
|
|
69
65
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
70
66
|
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
@@ -5,7 +5,6 @@ import androidx.work.Constraints
|
|
|
5
5
|
import androidx.work.Data
|
|
6
6
|
import androidx.work.ExistingPeriodicWorkPolicy
|
|
7
7
|
import androidx.work.ExistingWorkPolicy
|
|
8
|
-
import androidx.work.NetworkType
|
|
9
8
|
import androidx.work.OneTimeWorkRequest
|
|
10
9
|
import androidx.work.PeriodicWorkRequest
|
|
11
10
|
import androidx.work.WorkManager
|
|
@@ -62,9 +61,7 @@ class BackgroundRunner(context: android.content.Context) {
|
|
|
62
61
|
.putString("event", config.event)
|
|
63
62
|
.build()
|
|
64
63
|
|
|
65
|
-
val constraints = Constraints.Builder()
|
|
66
|
-
.setRequiredNetworkType(NetworkType.CONNECTED)
|
|
67
|
-
.build()
|
|
64
|
+
val constraints = Constraints.Builder().build()
|
|
68
65
|
|
|
69
66
|
if (!config.repeats) {
|
|
70
67
|
val work = OneTimeWorkRequest.Builder(RunnerWorker::class.java)
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor/background-runner",
|
|
3
|
-
"version": "3.1.0-dev.
|
|
3
|
+
"version": "3.1.0-dev.20260916T095625",
|
|
4
4
|
"description": "Capacitor Background Runner",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -31,24 +31,24 @@
|
|
|
31
31
|
"native"
|
|
32
32
|
],
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@capacitor/android": "
|
|
35
|
-
"@capacitor/cli": "
|
|
36
|
-
"@capacitor/core": "
|
|
37
|
-
"@capacitor/docgen": "^0.3.
|
|
38
|
-
"@capacitor/ios": "
|
|
34
|
+
"@capacitor/android": "next",
|
|
35
|
+
"@capacitor/cli": "next",
|
|
36
|
+
"@capacitor/core": "next",
|
|
37
|
+
"@capacitor/docgen": "^0.3.1",
|
|
38
|
+
"@capacitor/ios": "next",
|
|
39
39
|
"@ionic/eslint-config": "^0.4.0",
|
|
40
40
|
"@ionic/prettier-config": "^4.0.0",
|
|
41
41
|
"@ionic/swiftlint-config": "^2.0.0",
|
|
42
42
|
"eslint": "^8.57.1",
|
|
43
43
|
"prettier": "^3.6.2",
|
|
44
44
|
"prettier-plugin-java": "^2.7.7",
|
|
45
|
-
"rimraf": "^6.1.
|
|
46
|
-
"rollup": "^4.53.
|
|
45
|
+
"rimraf": "^6.1.0",
|
|
46
|
+
"rollup": "^4.53.2",
|
|
47
47
|
"swiftlint": "^2.0.0",
|
|
48
48
|
"typescript": "^5.9.3"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@capacitor/core": ">=
|
|
51
|
+
"@capacitor/core": ">=9.0.0-alpha.5"
|
|
52
52
|
},
|
|
53
53
|
"prettier": "@ionic/prettier-config",
|
|
54
54
|
"swiftlint": "@ionic/swiftlint-config",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"docgen": "docgen --api BackgroundRunnerPlugin --output-readme README.md --output-json dist/docs.json",
|
|
77
77
|
"docgen-api": "docgen --api CapacitorAPI --output-readme API.md --output-json dist/docs-api.json && node ./scripts/combine_docs.js",
|
|
78
78
|
"build-sdk": "./scripts/build-native-sdks.sh",
|
|
79
|
-
"build": "npm run clean && npm run docgen && npm run docgen-api && tsc && rollup -c rollup.config.
|
|
79
|
+
"build": "npm run clean && npm run docgen && npm run docgen-api && tsc && rollup -c rollup.config.mjs --bundleConfigAsCjs && npm run build-sdk && ./scripts/copy-native-sdks.sh && pnpm pack && mv ./capacitor-background-runner-*.tgz ../../ && ./scripts/copy-readme.sh",
|
|
80
80
|
"pack": "npm run build && ./scripts/copy-native-sdks.sh && pnpm pack && mv ./capacitor-background-runner-*.tgz ../../",
|
|
81
81
|
"clean": "rimraf ./dist",
|
|
82
82
|
"watch": "tsc --watch",
|