Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions assets/plugin-template/Package.swift.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@ import PackageDescription

let package = Package(
name: "{{{ NATIVE_NAME }}}",
platforms: [.iOS(.v15)],
platforms: [.iOS(.v16)],
products: [
.library(
name: "{{{ NATIVE_NAME }}}",
targets: ["{{ CLASS }}Plugin"])
],
dependencies: [
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "{{{ CAPACITOR_VERSION }}}")
.package(url: "https://github.com/ionic-team/capacitor.git", from: "{{{ CAPACITOR_VERSION }}}")
],
targets: [
.target(
name: "{{ CLASS }}Plugin",
dependencies: [
.product(name: "Capacitor", package: "capacitor-swift-pm"),
.product(name: "Cordova", package: "capacitor-swift-pm")
.product(name: "Capacitor", package: "capacitor")
],
path: "ios/Sources/{{ CLASS }}Plugin"),
.testTarget(
Expand Down
2 changes: 1 addition & 1 deletion assets/plugin-template/__NATIVE_NAME__.podspec.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '15.0'
s.ios.deployment_target = '16.0'
s.dependency 'Capacitor'
s.swift_version = '5.1'
end
28 changes: 9 additions & 19 deletions assets/plugin-template/android/build.gradle.mustache
Original file line number Diff line number Diff line change
@@ -1,40 +1,30 @@
ext {
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
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'
androidxAppCompatVersion = rootProject.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.8.0'
{{ #KOTLIN }}
androidxCoreKTXVersion = project.hasProperty('androidxCoreKTXVersion') ? rootProject.ext.androidxCoreKTXVersion : '1.17.0'
androidxCoreVersion = rootProject.hasProperty('androidxCoreVersion') ? rootProject.ext.androidxCoreVersion : '1.19.1'
{{ /KOTLIN }}
junitVersion = rootProject.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
androidxJunitVersion = rootProject.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.3.0'
androidxEspressoCoreVersion = rootProject.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.7.0'
}

buildscript {
{{ #KOTLIN }}
ext.kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : '2.2.20'
{{ /KOTLIN }}
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.13.0'
{{ #KOTLIN }}
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
{{ /KOTLIN }}
classpath 'com.android.tools.build:gradle:9.4.1'
}
}

apply plugin: 'com.android.library'
{{ #KOTLIN }}
apply plugin: 'kotlin-android'
{{ /KOTLIN }}

android {
namespace = "{{ PACKAGE_ID }}"
compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36
compileSdk = rootProject.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 37
defaultConfig {
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 24
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 36
minSdkVersion rootProject.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -72,7 +62,7 @@ dependencies {
implementation project(':capacitor-android')
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
{{ #KOTLIN }}
implementation "androidx.core:core-ktx:$androidxCoreKTXVersion"
implementation "androidx.core:core:$androidxCoreVersion"
{{ /KOTLIN }}
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
Expand Down
Binary file modified assets/plugin-template/android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.2-all.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
11 changes: 4 additions & 7 deletions assets/plugin-template/android/gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

86 changes: 52 additions & 34 deletions assets/plugin-template/android/gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { OptionValues } from './options';

const MUSTACHE_EXTENSION = '.mustache';

export const CAPACITOR_VERSION = '8.0.0';
export const CAPACITOR_VERSION = '9.0.0-rc.0';

const TEMPLATE_PATH = resolve(__dirname, '..', 'assets', 'plugin-template.tar.gz');

Expand Down
Loading