Skip to content

Commit 4753077

Browse files
authored
feat!: Update to Capacitor 6 (#101)
1 parent 8cfe67b commit 4753077

File tree

7 files changed

+22
-20
lines changed

7 files changed

+22
-20
lines changed

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ isPlaying(options: { assetId: string; }) => Promise<{ isPlaying: boolean; }>
373373
### addListener('complete', ...)
374374

375375
```typescript
376-
addListener(eventName: 'complete', listenerFunc: (event: { assetId: string; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
376+
addListener(eventName: 'complete', listenerFunc: (event: { assetId: string; }) => void) => Promise<PluginListenerHandle>
377377
```
378378

379379
Listen for asset completed playing event
@@ -383,7 +383,7 @@ Listen for asset completed playing event
383383
| **`eventName`** | <code>'complete'</code> |
384384
| **`listenerFunc`** | <code>(event: { assetId: string; }) =&gt; void</code> |
385385

386-
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
386+
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
387387

388388
**Since:** 5.0.1
389389

Diff for: android/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ buildscript {
1111
mavenCentral()
1212
}
1313
dependencies {
14-
classpath 'com.android.tools.build:gradle:8.0.0'
14+
classpath 'com.android.tools.build:gradle:8.2.1'
1515
}
1616
}
1717

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

2020
android {
2121
namespace "com.getcapacitor.community.audio.nativeaudio"
22-
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33
22+
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 34
2323
defaultConfig {
2424
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
25-
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33
25+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 34
2626
versionCode 1
2727
versionName "1.0"
2828
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

Diff for: android/gradle/wrapper/gradle-wrapper.jar

1.73 KB
Binary file not shown.

Diff for: android/gradle/wrapper/gradle-wrapper.properties

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-all.zip
44
networkTimeout=10000
5+
validateDistributionUrl=true
56
zipStoreBase=GRADLE_USER_HOME
67
zipStorePath=wrapper/dists

Diff for: android/gradlew

+8-4
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,6 @@ done
8585
APP_BASE_NAME=${0##*/}
8686
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
8787

88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
90-
9188
# Use the maximum available, or set MAX_FD != -1 to use that value.
9289
MAX_FD=maximum
9390

@@ -133,10 +130,13 @@ location of your Java installation."
133130
fi
134131
else
135132
JAVACMD=java
136-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
133+
if ! command -v java >/dev/null 2>&1
134+
then
135+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137136
138137
Please set the JAVA_HOME variable in your environment to match the
139138
location of your Java installation."
139+
fi
140140
fi
141141

142142
# Increase the maximum file descriptors if we can.
@@ -197,6 +197,10 @@ if "$cygwin" || "$msys" ; then
197197
done
198198
fi
199199

200+
201+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
202+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
203+
200204
# Collect all arguments for the java command;
201205
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
202206
# shell script including quotes and variable substitutions, so put them in

Diff for: package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@capacitor-community/native-audio",
3-
"version": "5.0.1",
3+
"version": "6.0.0",
44
"description": "A native plugin for native audio engine",
55
"main": "dist/plugin.js",
66
"module": "dist/esm/index.js",
@@ -41,10 +41,10 @@
4141
"license": "MIT",
4242
"dependencies": {},
4343
"devDependencies": {
44-
"@capacitor/android": "^5.0.0",
45-
"@capacitor/ios": "^5.0.0",
46-
"@capacitor/cli": "^5.0.0",
47-
"@capacitor/core": "^5.0.0",
44+
"@capacitor/android": "^6.0.0",
45+
"@capacitor/ios": "^6.0.0",
46+
"@capacitor/cli": "^6.0.0",
47+
"@capacitor/core": "^6.0.0",
4848
"@capacitor/docgen": "0.2.1",
4949
"@ionic/eslint-config": "^0.3.0",
5050
"@ionic/prettier-config": "~3.0.0",
@@ -59,7 +59,7 @@
5959
"husky": "^8.0.3"
6060
},
6161
"peerDependencies": {
62-
"@capacitor/core": "^5.0.0"
62+
"@capacitor/core": "^6.0.0"
6363
},
6464
"husky": {
6565
"hooks": {

Diff for: src/definitions.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ export interface NativeAudio {
1818
*
1919
* @since 5.0.1
2020
*/
21-
addListener(
22-
eventName: 'complete',
23-
listenerFunc: (event: { assetId: string }) => void
24-
): Promise<PluginListenerHandle> & PluginListenerHandle;
21+
addListener(eventName: 'complete', listenerFunc: (event: { assetId: string }) => void): Promise<PluginListenerHandle>;
2522
}
2623

2724
export interface ConfigureOptions {

0 commit comments

Comments
 (0)