Skip to content

Commit

Permalink
feat!: upgrade to capacitor 5
Browse files Browse the repository at this point in the history
  • Loading branch information
riderx committed May 22, 2023
1 parent a9d547c commit e8f8990
Show file tree
Hide file tree
Showing 10 changed files with 584 additions and 263 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ If no answer I will add the code directly to capacitor-mute
### isMuted()

```typescript
isMuted() => any
isMuted() => Promise<MuteResponse>
```

check if the device is muted

**Returns:** <code>any</code>
**Returns:** <code>Promise&lt;<a href="#muteresponse">MuteResponse</a>&gt;</code>

--------------------

Expand Down
19 changes: 10 additions & 9 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ext {
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.3'
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.4.0'
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.4.2'
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.5'
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1'
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.6.1'
}

buildscript {
Expand All @@ -11,17 +11,18 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'com.android.tools.build:gradle:8.0.0'
}
}

apply plugin: 'com.android.library'

android {
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 32
namespace "ee.forgr.plugin.mute"
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33
defaultConfig {
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 32
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -36,8 +37,8 @@ android {
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}

Expand Down
3 changes: 1 addition & 2 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ org.gradle.jvmargs=-Xmx1536m
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true

Binary file modified android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions android/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down
2 changes: 1 addition & 1 deletion android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ee.forgr.plugin.mute">
>
</manifest>
4 changes: 2 additions & 2 deletions ios/Plugin/Classes/Mute.swift
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,12 @@ public class Mute: NSObject {
// MARK: Notification Handlers

/// Selector called when app enters background
@objc private func didEnterBackground(_ sender: Any) {
private func didEnterBackground(_ sender: Any) {
self.isPaused = true
}

/// Selector called when app will enter foreground
@objc private func willEnterForeground(_ sender: Any) {
private func willEnterForeground(_ sender: Any) {
self.isPaused = false
}

Expand Down
38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,28 +44,28 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "^4.4.0",
"@capacitor/cli": "^4.4.0",
"@capacitor/core": "^4.4.0",
"@capacitor/docgen": "^0.2.0",
"@capacitor/ios": "^4.4.0",
"@capacitor/android": "^5.0.3",
"@capacitor/cli": "^5.0.3",
"@capacitor/core": "^5.0.0",
"@capacitor/docgen": "^0.2.1",
"@capacitor/ios": "^5.0.3",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "^2.0.0",
"@ionic/prettier-config": "^3.0.0",
"@ionic/swiftlint-config": "^1.1.2",
"@typescript-eslint/eslint-plugin": "^5.42.1",
"@typescript-eslint/parser": "^5.42.1",
"eslint": "^8.27.0",
"eslint-plugin-import": "^2.26.0",
"husky": "^8.0.2",
"prettier": "^2.7.1",
"prettier-plugin-java": "^2.0.0",
"rimraf": "^3.0.2",
"rollup": "^3.2.5",
"swiftlint": "^1.0.1",
"typescript": "^4.8.4"
"@typescript-eslint/eslint-plugin": "^5.59.2",
"@typescript-eslint/parser": "^5.59.6",
"eslint": "^8.41.0",
"eslint-plugin-import": "^2.27.5",
"husky": "^8.0.3",
"prettier": "^2.8.8",
"prettier-plugin-java": "^2.1.0",
"rimraf": "^5.0.1",
"rollup": "^3.23.0",
"swiftlint": "^1.0.2",
"typescript": "^5.0.4"
},
"peerDependencies": {
"@capacitor/core": "^4.0.0"
"@capacitor/core": "^5.0.0"
},
"prettier": "@ionic/prettier-config",
"swiftlint": "@ionic/swiftlint-config",
Expand All @@ -80,4 +80,4 @@
"src": "android"
}
}
}
}
Loading

0 comments on commit e8f8990

Please sign in to comment.