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
11 changes: 11 additions & 0 deletions packages/audio_streamer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 5.0.0

* **Breaking:** requires Flutter `>=3.44.0`
* **Breaking:** raised the minimum iOS deployment target from 8.0 to 16.0 and the Android `minSdk` from 16 to 24
* Added Swift Package Manager (SPM) support - Fixes [#1299](https://github.com/cph-cachet/flutter-plugins/issues/1299)
* Added `PrivacyInfo.xcprivacy` privacy manifest
* Updated Android `compileSdk 36` and Java 17
* Updated `permission_handler: ^13.0.1`
* Updated the example app
* Fix [#975](https://github.com/cph-cachet/flutter-plugins/issues/975)

## 4.3.0

* Fix issue where stream function made a new thread each time a recording starts - Fixes [#1242](https://github.com/cph-cachet/flutter-plugins/issues/1242)
Expand Down
14 changes: 13 additions & 1 deletion packages/audio_streamer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ If editing the `Info.plist` file manually, the entries needed are:
</array>
```

Edit the `Podfile` to include the permission for the microphone:
If your app requests the permission with [`permission_handler`](https://pub.dev/packages/permission_handler)
**and still integrates iOS dependencies with CocoaPods**, edit the `Podfile` to enable the
microphone permission:

```ruby
post_install do |installer|
Expand All @@ -45,6 +47,16 @@ post_install do |installer|
end
```

This step is not needed with Swift Package Manager — `permission_handler_apple` enables the
microphone permission automatically when `NSMicrophoneUsageDescription` is present in
`Info.plist`.

## Swift Package Manager

This plugin supports both [Swift Package Manager](https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-app-developers)
and CocoaPods on iOS. SPM is used automatically on Flutter 3.44 and later; no configuration is
needed. The example app is integrated with SPM only and has no `Podfile`.

## Using the plugin

The plugin works as a singleton and provide a simple `audioStream` to listen to.
Expand Down
60 changes: 0 additions & 60 deletions packages/audio_streamer/android/build.gradle

This file was deleted.

52 changes: 52 additions & 0 deletions packages/audio_streamer/android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
group = "plugins.cachet.audio_streamer"
version = "5.0.0"

allprojects {
repositories {
google()
mavenCentral()
}
}

plugins {
id("com.android.library")
}

// AGP 9+ has built-in Kotlin support; on older AGP the Kotlin Gradle plugin
// must be applied explicitly. Version is supplied by the consuming app.
// See https://docs.flutter.dev/release/breaking-changes/migrate-to-built-in-kotlin/for-plugin-authors
val agpMajor = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.substringBefore('.').toInt()
if (agpMajor < 9) {
apply(plugin = "org.jetbrains.kotlin.android")
}

android {
namespace = "plugins.cachet.audio_streamer"

compileSdk = 36

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

sourceSets {
getByName("main") {
java.srcDirs("src/main/kotlin")
}
}

defaultConfig {
minSdk = 24
}

lint {
disable += "InvalidPackage"
}
}

project.extensions.configure(org.jetbrains.kotlin.gradle.dsl.KotlinAndroidProjectExtension::class.java) {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}
3 changes: 0 additions & 3 deletions packages/audio_streamer/android/gradle.properties

This file was deleted.

27 changes: 0 additions & 27 deletions packages/audio_streamer/android/settings.gradle

This file was deleted.

1 change: 1 addition & 0 deletions packages/audio_streamer/android/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = "audio_streamer"
72 changes: 0 additions & 72 deletions packages/audio_streamer/example/android/app/build.gradle

This file was deleted.

44 changes: 44 additions & 0 deletions packages/audio_streamer/example/android/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
plugins {
id("com.android.application")
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id("dev.flutter.flutter-gradle-plugin")
}

android {
namespace = "plugins.cachet.audio_streamer_example"
// permission_handler_android 14 requires compiling against API 37, which is
// ahead of Flutter's default (flutter.compileSdkVersion == 36).
compileSdk = 37
ndkVersion = flutter.ndkVersion

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

defaultConfig {
applicationId = "plugins.cachet.audio_streamer_example"
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig = signingConfigs.getByName("debug")
}
}
}

kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}

flutter {
source = "../.."
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.RECORD_AUDIO" />
</manifest>
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<application
android:name="${applicationName}"
android:label="audio_streamer_example"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
package plugins.cachet.audio_streamer_example

import androidx.annotation.NonNull;
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugins.GeneratedPluginRegistrant

class MainActivity: FlutterActivity() {
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
GeneratedPluginRegistrant.registerWith(flutterEngine);
}
}
class MainActivity : FlutterActivity()
18 changes: 0 additions & 18 deletions packages/audio_streamer/example/android/build.gradle

This file was deleted.

24 changes: 24 additions & 0 deletions packages/audio_streamer/example/android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
allprojects {
repositories {
google()
mavenCentral()
}
}

val newBuildDir: Directory =
rootProject.layout.buildDirectory
.dir("../../build")
.get()
rootProject.layout.buildDirectory.value(newBuildDir)

subprojects {
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
project.layout.buildDirectory.value(newSubprojectBuildDir)
}
subprojects {
project.evaluationDependsOn(":app")
}

tasks.register<Delete>("clean") {
delete(rootProject.layout.buildDirectory)
}
10 changes: 5 additions & 5 deletions packages/audio_streamer/example/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
org.gradle.jvmargs=-Xmx1536M
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false

# This newDsl flag was added by the Flutter template
android.newDsl=false
# This builtInKotlin flag was added by the Flutter template
android.builtInKotlin=false
Loading
Loading