@capgo/capacitor-light-sensor 8.1.25 → 9.0.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.
@@ -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 = '15.0'
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
@@ -3,21 +3,20 @@ import PackageDescription
3
3
 
4
4
  let package = Package(
5
5
  name: "CapgoCapacitorLightSensor",
6
- platforms: [.iOS(.v15)],
6
+ platforms: [.iOS(.v16)],
7
7
  products: [
8
8
  .library(
9
9
  name: "CapgoCapacitorLightSensor",
10
10
  targets: ["CapgoLightSensorPlugin"])
11
11
  ],
12
12
  dependencies: [
13
- .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "8.0.0")
13
+ .package(url: "https://github.com/ionic-team/capacitor.git", from: "9.0.0")
14
14
  ],
15
15
  targets: [
16
16
  .target(
17
17
  name: "CapgoLightSensorPlugin",
18
18
  dependencies: [
19
- .product(name: "Capacitor", package: "capacitor-swift-pm"),
20
- .product(name: "Cordova", package: "capacitor-swift-pm")
19
+ .product(name: "Capacitor", package: "capacitor")
21
20
  ],
22
21
  path: "ios/Sources/CapgoLightSensorPlugin"),
23
22
  .testTarget(
package/README.md CHANGED
@@ -57,12 +57,26 @@ We build, improve and fix our plugins with heavy use of AI, so issues usually ge
57
57
 
58
58
  | Plugin version | Capacitor compatibility | Maintained |
59
59
  | -------------- | ----------------------- | ---------- |
60
- | v8.\*.\* | v8.\*.\* | ✅ |
60
+ | v9.\*.\* | v9.\*.\* | ✅ |
61
+ | v8.\*.\* | v8.\*.\* | On demand |
61
62
  | v7.\*.\* | v7.\*.\* | On demand |
62
63
  | v6.\*.\* | v6.\*.\* | ❌ |
63
64
  | v5.\*.\* | v5.\*.\* | ❌ |
64
65
 
65
- > **Note:** The major version of this plugin follows the major version of Capacitor. Use the version that matches your Capacitor installation (e.g., plugin v8 for Capacitor 8). Only the latest major version is actively maintained.
66
+ > **Note:** The major version of this plugin follows the major version of Capacitor. Use the version that matches your Capacitor installation (e.g., plugin v9 for Capacitor 9). Only the latest major version is actively maintained.
67
+
68
+ ## Migrating from v8 to v9
69
+
70
+ v9 of `@capgo/capacitor-light-sensor` targets Capacitor 9. Update Capacitor and this plugin together, then sync the native projects:
71
+
72
+ ```bash
73
+ npm install @capacitor/core@^9.0.0 @capacitor/cli@^9.0.0 @capacitor/ios@^9.0.0 @capacitor/android@^9.0.0 @capgo/capacitor-light-sensor@^9.0.0
74
+ npx cap sync
75
+ ```
76
+
77
+ Capacitor 9 needs Node.js 24+, iOS 16+ (Xcode 27) and Android minSdk 26 / compileSdk 37. Follow the official [Capacitor 9 update guide](https://capacitorjs.com/docs/updating/9-0) for the app side changes.
78
+
79
+ No plugin API was removed: the JavaScript API of v9 is the same as v8.
66
80
 
67
81
  ## Installation
68
82
 
@@ -1,31 +1,30 @@
1
+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2
+
1
3
  ext {
2
- junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
3
- androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.1'
4
- androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
5
- androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
4
+ junitVersion = rootProject.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
5
+ androidxAppCompatVersion = rootProject.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.8.0'
6
+ androidxJunitVersion = rootProject.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.3.0'
7
+ androidxEspressoCoreVersion = rootProject.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.7.0'
6
8
  }
7
9
 
8
10
  buildscript {
9
- ext.kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : '2.1.21'
10
11
  repositories {
11
12
  google()
12
13
  mavenCentral()
13
14
  }
14
15
  dependencies {
15
- classpath 'com.android.tools.build:gradle:8.13.0'
16
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
16
+ classpath 'com.android.tools.build:gradle:9.4.1'
17
17
  }
18
18
  }
19
19
 
20
20
  apply plugin: 'com.android.library'
21
- apply plugin: 'kotlin-android'
22
21
 
23
22
  android {
24
- namespace "app.capgo.capacitor.lightsensor"
25
- compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36
23
+ namespace = "app.capgo.capacitor.lightsensor"
24
+ compileSdk = rootProject.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 37
26
25
  defaultConfig {
27
- minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 24
28
- targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 36
26
+ consumerProguardFiles "proguard-rules.pro"
27
+ minSdkVersion rootProject.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 26
29
28
  testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
30
29
  }
31
30
  buildTypes {
@@ -35,14 +34,17 @@ android {
35
34
  }
36
35
  }
37
36
  lintOptions {
38
- abortOnError false
37
+ abortOnError = false
39
38
  }
40
39
  compileOptions {
41
40
  sourceCompatibility JavaVersion.VERSION_21
42
41
  targetCompatibility JavaVersion.VERSION_21
43
42
  }
44
- kotlinOptions {
45
- jvmTarget = '21'
43
+ }
44
+
45
+ kotlin {
46
+ compilerOptions {
47
+ jvmTarget = JvmTarget.JVM_21
46
48
  }
47
49
  }
48
50
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-light-sensor",
3
- "version": "8.1.25",
3
+ "version": "9.0.0",
4
4
  "description": "Capacitor plugin for accessing the device light sensor (Android only)",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -61,10 +61,10 @@
61
61
  "changelog:ai": "node scripts/generate-ai-changelog.mjs"
62
62
  },
63
63
  "devDependencies": {
64
- "@capacitor/android": "^8.0.0",
65
- "@capacitor/core": "^8.0.0",
64
+ "@capacitor/android": "^9.0.0",
65
+ "@capacitor/core": "^9.0.0",
66
66
  "@capacitor/docgen": "^0.3.1",
67
- "@capacitor/ios": "^8.0.0",
67
+ "@capacitor/ios": "^9.0.0",
68
68
  "@ionic/eslint-config": "^0.5.0",
69
69
  "@ionic/prettier-config": "^4.0.0",
70
70
  "@ionic/swiftlint-config": "^2.0.0",
@@ -80,7 +80,7 @@
80
80
  "typescript": "^6.0.3"
81
81
  },
82
82
  "peerDependencies": {
83
- "@capacitor/core": "^8.0.0"
83
+ "@capacitor/core": "^9.0.0"
84
84
  },
85
85
  "prettier": "@ionic/prettier-config",
86
86
  "swiftlint": "@ionic/swiftlint-config",