diff --git a/BREAKING.md b/BREAKING.md new file mode 100644 index 0000000..f7cb5ea --- /dev/null +++ b/BREAKING.md @@ -0,0 +1,15 @@ +## Versions + +- [Version 4.x.x](#version-4xx) + +## Version 4.x.x + +### Capacitor 4 + +This plugin now supports Capacitor 4 only. Please run `npx cap sync` after updating this package. + +If you want to use this plugin with Capacitor 3, please install version `0.2.1`: + +``` +npm i capacitor-native-settings@0.2.1 +``` \ No newline at end of file diff --git a/android/build.gradle b/android/build.gradle index 061992c..3de9898 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,27 +1,27 @@ ext { - junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.1' - androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.2.0' - androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.2' - androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.3.0' + junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2' + androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.4.2' + androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.3' + androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.4.0' } buildscript { repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:4.2.1' + classpath 'com.android.tools.build:gradle:7.2.1' } } apply plugin: 'com.android.library' android { - compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 30 + compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 32 defaultConfig { - minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 21 - targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 30 + minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22 + targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 32 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -36,14 +36,13 @@ android { abortOnError false } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } } repositories { google() - jcenter() mavenCentral() } diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 3c4101c..60103f9 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip +distributionUrl=https://services.gradle.org/distributions/gradle-7.4.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/ios/Plugin.xcodeproj/project.pbxproj b/ios/Plugin.xcodeproj/project.pbxproj index 09cae14..d2c81ed 100644 --- a/ios/Plugin.xcodeproj/project.pbxproj +++ b/ios/Plugin.xcodeproj/project.pbxproj @@ -382,7 +382,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -442,7 +442,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; @@ -465,7 +465,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Plugin/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)\n$(FRAMEWORK_SEARCH_PATHS)\n$(FRAMEWORK_SEARCH_PATHS)"; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.Plugin; @@ -490,7 +490,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Plugin/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)"; ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.Plugin; diff --git a/ios/Podfile b/ios/Podfile index 54a00c1..dee4096 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,4 +1,4 @@ -platform :ios, '12.0' +platform :ios, '13.0' def capacitor_pods # Comment the next line if you're not using Swift and don't want to use dynamic frameworks diff --git a/package-lock.json b/package-lock.json index 7257722..5a28c41 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,18 +1,18 @@ { "name": "capacitor-native-settings", - "version": "0.1.1", + "version": "4.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "capacitor-native-settings", - "version": "0.1.1", + "version": "4.0.0", "license": "MIT", "devDependencies": { - "@capacitor/android": "^3.0.0", - "@capacitor/core": "^3.0.0", + "@capacitor/android": "^4.0.1", + "@capacitor/core": "^4.0.1", "@capacitor/docgen": "^0.0.10", - "@capacitor/ios": "^3.0.0", + "@capacitor/ios": "^4.0.1", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "^1.0.1", "@ionic/swiftlint-config": "^1.1.2", @@ -25,7 +25,7 @@ "typescript": "~4.0.3" }, "peerDependencies": { - "@capacitor/core": "^3.0.0" + "@capacitor/core": "^4.0.1" } }, "node_modules/@babel/code-frame": { @@ -69,18 +69,18 @@ } }, "node_modules/@capacitor/android": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/@capacitor/android/-/android-3.2.5.tgz", - "integrity": "sha512-eq9luSS8Bivyp3F46BaUgmPXxMzuUTdZO/bToHIUBu66Ufh4ou/TDg0opMXjuKIYJgjAsddxkPBeREj8KabbSQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@capacitor/android/-/android-4.0.1.tgz", + "integrity": "sha512-JXToVdVYe4icOcPG8GOIiRoGSu3zQcZW965o2HUxWC0vQF3Xh0/ntbNL/J1Vf7HODyUkiRnozvzDzn6nWoVQEQ==", "dev": true, "peerDependencies": { - "@capacitor/core": "^3.2.0" + "@capacitor/core": "^4.0.0" } }, "node_modules/@capacitor/core": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/@capacitor/core/-/core-3.2.5.tgz", - "integrity": "sha512-sr5ZhbdCUL6FAiyNEDpSKDEzjHCOsCA5R32inRergcPFRpOArsQi/NfhoMLHaZwZ78HAn9bfFV7JkoSr46NDDw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@capacitor/core/-/core-4.0.1.tgz", + "integrity": "sha512-gita0j7UPoGyHejAUsrW1OrkyDSp7gfHn45fkeQclHRSz7UWLF4hqE1R/6INsVmIFu/amIApxfHed8h3m/Fm7g==", "dev": true, "dependencies": { "tslib": "^2.1.0" @@ -105,12 +105,12 @@ } }, "node_modules/@capacitor/ios": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/@capacitor/ios/-/ios-3.2.5.tgz", - "integrity": "sha512-z3GU07Dz3SJIfdxk4JaLXDZcWWb4LcvjMz7RzOmN13WOWETWWWUnJJdG14QJewjvXPEBZ/XY7MohClWsgjToEw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@capacitor/ios/-/ios-4.0.1.tgz", + "integrity": "sha512-46qigDiPKHXxihSSjXDIbuF8/1O9xWVgMzJpEFJhhhav+vHy6/SDc2liKLhmqCwH2OzZGxk+IlSGlkc4Oyorkw==", "dev": true, "peerDependencies": { - "@capacitor/core": "^3.2.0" + "@capacitor/core": "^4.0.0" } }, "node_modules/@eslint/eslintrc": { @@ -3104,16 +3104,16 @@ } }, "@capacitor/android": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/@capacitor/android/-/android-3.2.5.tgz", - "integrity": "sha512-eq9luSS8Bivyp3F46BaUgmPXxMzuUTdZO/bToHIUBu66Ufh4ou/TDg0opMXjuKIYJgjAsddxkPBeREj8KabbSQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@capacitor/android/-/android-4.0.1.tgz", + "integrity": "sha512-JXToVdVYe4icOcPG8GOIiRoGSu3zQcZW965o2HUxWC0vQF3Xh0/ntbNL/J1Vf7HODyUkiRnozvzDzn6nWoVQEQ==", "dev": true, "requires": {} }, "@capacitor/core": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/@capacitor/core/-/core-3.2.5.tgz", - "integrity": "sha512-sr5ZhbdCUL6FAiyNEDpSKDEzjHCOsCA5R32inRergcPFRpOArsQi/NfhoMLHaZwZ78HAn9bfFV7JkoSr46NDDw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@capacitor/core/-/core-4.0.1.tgz", + "integrity": "sha512-gita0j7UPoGyHejAUsrW1OrkyDSp7gfHn45fkeQclHRSz7UWLF4hqE1R/6INsVmIFu/amIApxfHed8h3m/Fm7g==", "dev": true, "requires": { "tslib": "^2.1.0" @@ -3132,9 +3132,9 @@ } }, "@capacitor/ios": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/@capacitor/ios/-/ios-3.2.5.tgz", - "integrity": "sha512-z3GU07Dz3SJIfdxk4JaLXDZcWWb4LcvjMz7RzOmN13WOWETWWWUnJJdG14QJewjvXPEBZ/XY7MohClWsgjToEw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@capacitor/ios/-/ios-4.0.1.tgz", + "integrity": "sha512-46qigDiPKHXxihSSjXDIbuF8/1O9xWVgMzJpEFJhhhav+vHy6/SDc2liKLhmqCwH2OzZGxk+IlSGlkc4Oyorkw==", "dev": true, "requires": {} }, diff --git a/package.json b/package.json index 26f9586..9054dfd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "capacitor-native-settings", - "version": "0.2.1", + "version": "4.0.0", "description": "Capacitor plugin to open native settings screens for android and iOS", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -29,7 +29,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin && cd ..", + "verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", @@ -44,10 +44,10 @@ "prepublishOnly": "npm run build" }, "devDependencies": { - "@capacitor/android": "^3.0.0", - "@capacitor/core": "^3.0.0", + "@capacitor/android": "^4.0.1", + "@capacitor/core": "^4.0.1", "@capacitor/docgen": "^0.0.10", - "@capacitor/ios": "^3.0.0", + "@capacitor/ios": "^4.0.1", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "^1.0.1", "@ionic/swiftlint-config": "^1.1.2", @@ -60,7 +60,7 @@ "typescript": "~4.0.3" }, "peerDependencies": { - "@capacitor/core": "^3.0.0" + "@capacitor/core": "^4.0.1" }, "prettier": "@ionic/prettier-config", "swiftlint": "@ionic/swiftlint-config",