Skip to content

Commit 2990277

Browse files
authored
feat!: Capacitor 8 support (#156)
* feat!: Capacitor 8 support BREAKING CHANGE: This plugin now supports Capacitor 8. * chore(deps): install `@types/node`
1 parent d17a270 commit 2990277

File tree

10 files changed

+332
-1395
lines changed

10 files changed

+332
-1395
lines changed

CapacitorCommunityTextToSpeech.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
1111
s.author = package['author']
1212
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
1313
s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
14-
s.ios.deployment_target = '14.0'
14+
s.ios.deployment_target = '15.0'
1515
s.dependency 'Capacitor'
1616
s.swift_version = '5.1'
1717
end

Package.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ import PackageDescription
33

44
let package = Package(
55
name: "CapacitorCommunityTextToSpeech",
6-
platforms: [.iOS(.v14)],
6+
platforms: [.iOS(.v15)],
77
products: [
88
.library(
99
name: "CapacitorCommunityTextToSpeech",
1010
targets: ["TextToSpeechPlugin"])
1111
],
1212
dependencies: [
13-
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0")
13+
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "8.0.0")
1414
],
1515
targets: [
1616
.target(
@@ -25,4 +25,4 @@ let package = Package(
2525
dependencies: ["TextToSpeechPlugin"],
2626
path: "ios/Tests/TextToSpeechPluginTests")
2727
]
28-
)
28+
)

android/build.gradle

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
ext {
22
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
3-
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
4-
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
5-
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
3+
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.1'
4+
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.3.0'
5+
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.7.0'
66
}
77

88
buildscript {
@@ -11,18 +11,18 @@ buildscript {
1111
mavenCentral()
1212
}
1313
dependencies {
14-
classpath 'com.android.tools.build:gradle:8.2.1'
14+
classpath 'com.android.tools.build:gradle:8.13.0'
1515
}
1616
}
1717

1818
apply plugin: 'com.android.library'
1919

2020
android {
21-
namespace "com.getcapacitor.community.tts"
22-
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 35
21+
namespace = "com.getcapacitor.community.tts"
22+
compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36
2323
defaultConfig {
24-
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23
25-
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 35
24+
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 24
25+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 36
2626
versionCode 1
2727
versionName "1.0"
2828
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -34,7 +34,7 @@ android {
3434
}
3535
}
3636
lintOptions {
37-
abortOnError false
37+
abortOnError = false
3838
}
3939
compileOptions {
4040
sourceCompatibility JavaVersion.VERSION_21
181 Bytes
Binary file not shown.

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

android/gradlew

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/gradlew.bat

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ios/Sources/TextToSpeechPlugin/TextToSpeechPlugin.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ import AVFoundation
88
*/
99
@objc(TextToSpeechPlugin)
1010
public class TextToSpeechPlugin: CAPPlugin, CAPBridgedPlugin {
11-
public let identifier = "TextToSpeechPlugin"
12-
public let jsName = "TextToSpeech"
11+
public let identifier = "TextToSpeechPlugin"
12+
public let jsName = "TextToSpeech"
1313
public let pluginMethods: [CAPPluginMethod] = [
1414
CAPPluginMethod(name: "speak", returnType: CAPPluginReturnPromise),
1515
CAPPluginMethod(name: "stop", returnType: CAPPluginReturnPromise),
1616
CAPPluginMethod(name: "openInstall", returnType: CAPPluginReturnPromise),
1717
CAPPluginMethod(name: "getSupportedLanguages", returnType: CAPPluginReturnPromise),
1818
CAPPluginMethod(name: "getSupportedVoices", returnType: CAPPluginReturnPromise),
19-
CAPPluginMethod(name: "isLanguageSupported", returnType: CAPPluginReturnPromise),
20-
]
19+
CAPPluginMethod(name: "isLanguageSupported", returnType: CAPPluginReturnPromise)
20+
]
2121
private static let errorUnsupportedLanguage = "This language is not supported."
2222

2323
private let implementation = TextToSpeech()

0 commit comments

Comments
 (0)