@cap-kit/settings 8.1.1 → 8.1.2

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.
@@ -5,7 +5,7 @@ buildscript {
5
5
  mavenCentral()
6
6
  }
7
7
  dependencies {
8
- classpath 'com.android.tools.build:gradle:8.13.0'
8
+ classpath 'com.android.tools.build:gradle:8.13.2'
9
9
  classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
10
10
  }
11
11
  }
@@ -81,9 +81,6 @@ android {
81
81
  sourceCompatibility = JavaVersion.VERSION_21
82
82
  targetCompatibility = JavaVersion.VERSION_21
83
83
  }
84
- kotlinOptions {
85
- jvmTarget = JavaVersion.VERSION_21
86
- }
87
84
  }
88
85
 
89
86
  repositories {
@@ -12,7 +12,9 @@ import com.getcapacitor.Plugin
12
12
  * Configuration is read once during plugin initialization and treated as
13
13
  * immutable runtime input.
14
14
  */
15
- class SettingsConfig(plugin: Plugin) {
15
+ class SettingsConfig(
16
+ plugin: Plugin,
17
+ ) {
16
18
  /**
17
19
  * Android application context.
18
20
  * Exposed for native components that may require it.
@@ -12,14 +12,22 @@ sealed class SettingsError(
12
12
  message: String,
13
13
  ) : Throwable(message) {
14
14
  /** Feature or capability is not available on this device */
15
- class Unavailable(message: String) : SettingsError(message)
15
+ class Unavailable(
16
+ message: String,
17
+ ) : SettingsError(message)
16
18
 
17
19
  /** Permission was denied by the user or system */
18
- class PermissionDenied(message: String) : SettingsError(message)
20
+ class PermissionDenied(
21
+ message: String,
22
+ ) : SettingsError(message)
19
23
 
20
24
  /** Plugin failed to initialize correctly */
21
- class InitFailed(message: String) : SettingsError(message)
25
+ class InitFailed(
26
+ message: String,
27
+ ) : SettingsError(message)
22
28
 
23
29
  /** Unsupported or unknown type/value was provided */
24
- class UnknownType(message: String) : SettingsError(message)
30
+ class UnknownType(
31
+ message: String,
32
+ ) : SettingsError(message)
25
33
  }
@@ -25,8 +25,8 @@ object SettingsUtils {
25
25
  fun resolveIntent(
26
26
  option: String,
27
27
  packageName: String,
28
- ): Intent? {
29
- return when (option) {
28
+ ): Intent? =
29
+ when (option) {
30
30
  // --- App-specific ---
31
31
  "application_details" ->
32
32
  Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS).apply {
@@ -71,5 +71,4 @@ object SettingsUtils {
71
71
 
72
72
  else -> null
73
73
  }
74
- }
75
74
  }
@@ -10,7 +10,7 @@ import Foundation
10
10
  public enum PluginVersion {
11
11
  /**
12
12
  The semantic version string of the plugin.
13
- Value synchronized from package.json: "8.1.1"
13
+ Value synchronized from package.json: "8.1.2"
14
14
  */
15
- public static let number = "8.1.1"
15
+ public static let number = "8.1.2"
16
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cap-kit/settings",
3
- "version": "8.1.1",
3
+ "version": "8.1.2",
4
4
  "description": "Capacitor plugin to open app and system settings on iOS and Android.",
5
5
  "type": "module",
6
6
  "private": false,
@@ -13,6 +13,14 @@
13
13
  "module": "dist/esm/index.js",
14
14
  "types": "dist/esm/index.d.ts",
15
15
  "unpkg": "dist/plugin.js",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/esm/index.d.ts",
19
+ "import": "./dist/esm/index.js",
20
+ "require": "./dist/plugin.cjs.js"
21
+ },
22
+ "./package.json": "./package.json"
23
+ },
16
24
  "files": [
17
25
  "android/src/main/",
18
26
  "android/build.gradle",
@@ -21,7 +29,8 @@
21
29
  "ios/Tests",
22
30
  "Package.swift",
23
31
  "CapKitSettings.podspec",
24
- "LICENSE"
32
+ "LICENSE",
33
+ "README.md"
25
34
  ],
26
35
  "author": "CapKit Team",
27
36
  "funding": {
@@ -41,18 +50,13 @@
41
50
  "keywords": [
42
51
  "capacitor",
43
52
  "capacitor-plugin",
53
+ "cap-kit",
44
54
  "plugin",
45
55
  "native",
46
56
  "settings",
47
- "cap-kit"
57
+ "ios",
58
+ "android"
48
59
  ],
49
- "exports": {
50
- ".": {
51
- "types": "./dist/esm/index.d.ts",
52
- "import": "./dist/esm/index.js",
53
- "require": "./dist/plugin.cjs.js"
54
- }
55
- },
56
60
  "publishConfig": {
57
61
  "access": "public"
58
62
  },
@@ -88,7 +92,7 @@
88
92
  },
89
93
  "scripts": {
90
94
  "verify": "pnpm run verify:ios && pnpm run verify:android && pnpm run verify:web",
91
- "verify:ios": "node ./scripts/sync-version.js && xcodebuild -scheme CapKitSettings -destination generic/platform=iOS",
95
+ "verify:ios": "node ./scripts/sync-version.mjs && xcodebuild -scheme CapKitSettings -destination generic/platform=iOS",
92
96
  "verify:android": "cd android && ./gradlew clean build && cd ..",
93
97
  "verify:web": "pnpm run build",
94
98
  "lint:android": "cd android && ./gradlew ktlintCheck",
@@ -100,7 +104,7 @@
100
104
  "prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
101
105
  "swiftlint": "node-swiftlint lint ios/Sources",
102
106
  "docgen": "docgen --api SettingsPlugin --output-readme README.md --output-json dist/docs.json",
103
- "build": "node ./scripts/sync-version.js && pnpm run clean && pnpm run docgen && tsc && rollup -c rollup.config.mjs",
107
+ "build": "node ./scripts/sync-version.mjs && pnpm run clean && pnpm run docgen && tsc && rollup -c rollup.config.mjs",
104
108
  "clean": "rimraf ./dist",
105
109
  "watch": "tsc --watch",
106
110
  "test": "pnpm run verify",