diff --git a/assets/plugin-template/Package.swift.mustache b/assets/plugin-template/Package.swift.mustache index 969dfa7..371dff3 100644 --- a/assets/plugin-template/Package.swift.mustache +++ b/assets/plugin-template/Package.swift.mustache @@ -3,7 +3,7 @@ import PackageDescription let package = Package( name: "{{{ NATIVE_NAME }}}", - platforms: [.iOS(.v14)], + platforms: [.iOS(.v15)], products: [ .library( name: "{{{ NATIVE_NAME }}}", diff --git a/assets/plugin-template/__NATIVE_NAME__.podspec.mustache b/assets/plugin-template/__NATIVE_NAME__.podspec.mustache index 4ee4006..a60aee7 100644 --- a/assets/plugin-template/__NATIVE_NAME__.podspec.mustache +++ b/assets/plugin-template/__NATIVE_NAME__.podspec.mustache @@ -11,7 +11,7 @@ Pod::Spec.new do |s| s.author = package['author'] s.source = { :git => package['repository']['url'], :tag => s.version.to_s } s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}' - s.ios.deployment_target = '14.0' + s.ios.deployment_target = '15.0' s.dependency 'Capacitor' s.swift_version = '5.1' end diff --git a/assets/plugin-template/android/build.gradle.mustache b/assets/plugin-template/android/build.gradle.mustache index 350a9bb..29618ed 100644 --- a/assets/plugin-template/android/build.gradle.mustache +++ b/assets/plugin-template/android/build.gradle.mustache @@ -1,8 +1,8 @@ ext { junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2' - androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0' - androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1' - androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1' + androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.1' + androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.3.0' + androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.7.0' } buildscript { @@ -11,18 +11,18 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:8.7.2' + classpath 'com.android.tools.build:gradle:8.13.0' } } apply plugin: 'com.android.library' android { - namespace "{{ PACKAGE_ID }}" - compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 35 + namespace = "{{ PACKAGE_ID }}" + compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36 defaultConfig { - minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23 - targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 35 + minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 24 + targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 36 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -34,7 +34,7 @@ android { } } lintOptions { - abortOnError false + abortOnError = false } compileOptions { sourceCompatibility JavaVersion.VERSION_21 diff --git a/assets/plugin-template/android/gradle/wrapper/gradle-wrapper.jar b/assets/plugin-template/android/gradle/wrapper/gradle-wrapper.jar index a4b76b9..1b33c55 100644 Binary files a/assets/plugin-template/android/gradle/wrapper/gradle-wrapper.jar and b/assets/plugin-template/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/assets/plugin-template/android/gradle/wrapper/gradle-wrapper.properties b/assets/plugin-template/android/gradle/wrapper/gradle-wrapper.properties index c1d5e01..7705927 100644 --- a/assets/plugin-template/android/gradle/wrapper/gradle-wrapper.properties +++ b/assets/plugin-template/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/assets/plugin-template/android/gradlew b/assets/plugin-template/android/gradlew index f5feea6..23d15a9 100755 --- a/assets/plugin-template/android/gradlew +++ b/assets/plugin-template/android/gradlew @@ -86,8 +86,7 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s -' "$PWD" ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -115,7 +114,7 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar +CLASSPATH="\\\"\\\"" # Determine the Java command to use to start the JVM. @@ -206,7 +205,7 @@ fi DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, # and any embedded shellness will be escaped. # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be # treated as '${Hostname}' itself on the command line. @@ -214,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" # Stop when "xargs" is not available. diff --git a/assets/plugin-template/android/gradlew.bat b/assets/plugin-template/android/gradlew.bat index 9b42019..5eed7ee 100644 --- a/assets/plugin-template/android/gradlew.bat +++ b/assets/plugin-template/android/gradlew.bat @@ -70,11 +70,11 @@ goto fail :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar +set CLASSPATH= @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell diff --git a/assets/plugin-template/package.json.mustache b/assets/plugin-template/package.json.mustache index 36ac2c5..ac3f65b 100644 --- a/assets/plugin-template/package.json.mustache +++ b/assets/plugin-template/package.json.mustache @@ -50,18 +50,18 @@ "devDependencies": { "@capacitor/android": "^{{{ CAPACITOR_VERSION }}}", "@capacitor/core": "^{{{ CAPACITOR_VERSION }}}", - "@capacitor/docgen": "^0.3.0", + "@capacitor/docgen": "^0.3.1", "@capacitor/ios": "^{{{ CAPACITOR_VERSION }}}", "@ionic/eslint-config": "^0.4.0", "@ionic/prettier-config": "^4.0.0", "@ionic/swiftlint-config": "^2.0.0", - "eslint": "^8.57.0", - "prettier": "^3.4.2", - "prettier-plugin-java": "^2.6.6", - "rimraf": "^6.0.1", - "rollup": "^4.30.1", + "eslint": "^8.57.1", + "prettier": "^3.6.2", + "prettier-plugin-java": "^2.7.7", + "rimraf": "^6.1.0", + "rollup": "^4.53.2", "swiftlint": "^2.0.0", - "typescript": "~4.1.5" + "typescript": "^5.9.3" }, "peerDependencies": { "@capacitor/core": ">={{{ CAPACITOR_VERSION }}}" diff --git a/package.json b/package.json index 2a7fb66..981772a 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "devDependencies": { "@ionic/eslint-config": "^0.4.0", "@ionic/prettier-config": "^4.0.0", + "@types/node": "18.18.6", "@types/debug": "^4.1.12", "@types/mustache": "^4.2.5", "@types/prompts": "^2.4.9", diff --git a/src/template.ts b/src/template.ts index e9ffb68..72ca980 100644 --- a/src/template.ts +++ b/src/template.ts @@ -7,7 +7,7 @@ import type { OptionValues } from './options'; const MUSTACHE_EXTENSION = '.mustache'; -export const CAPACITOR_VERSION = '7.0.0'; +export const CAPACITOR_VERSION = '8.0.0'; const TEMPLATE_PATH = resolve(__dirname, '..', 'assets', 'plugin-template.tar.gz');