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
5 changes: 2 additions & 3 deletions packages/audio_streamer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
## 4.2.1
## 4.2.2

* Update example app and outdated libraries
* Upgraded Gradle
* Reverts [#1226](https://github.com/cph-cachet/flutter-plugins/pull/1226)

## 4.2.0

Expand Down
14 changes: 7 additions & 7 deletions packages/audio_streamer/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ group 'plugins.cachet.audio_streamer'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '2.2.0'
ext.kotlin_version = '1.9.22'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:8.11.0'
classpath 'com.android.tools.build:gradle:8.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -25,16 +25,16 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdk flutter.compileSdkVersion
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = '21'
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -45,7 +45,7 @@ android {
}

defaultConfig {
minSdkVersion 21
minSdkVersion 16
targetSdkVersion flutter.targetSdkVersion
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
71 changes: 44 additions & 27 deletions packages/audio_streamer/example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,55 +1,72 @@
plugins {
id("com.android.application")
id("kotlin-android")
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id("dev.flutter.flutter-gradle-plugin")
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

android {
namespace = "plugins.cachet.audio_streamer_example"
compileSdk = flutter.compileSdkVersion
ndkVersion = "27.0.12077973"
namespace 'plugins.cachet.audio_streamer_example'
compileSdkVersion flutter.compileSdkVersion

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

buildFeatures {
buildConfig = true
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
jvmTarget = '1.8'
}

lint {
disable 'InvalidPackage'
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "plugins.cachet.audio_streamer_example"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
applicationId "plugins.cachet.audio_streamer_example"
minSdkVersion 28
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}

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")
signingConfig signingConfigs.debug
}
}
}

flutter {
source = "../.."
source '../..'
}


dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.13.2'
androidTestImplementation 'androidx.test:runner:1.6.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:runner:1.5.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
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()
class MainActivity: FlutterActivity() {
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
GeneratedPluginRegistrant.registerWith(flutterEngine);
}
}
18 changes: 18 additions & 0 deletions packages/audio_streamer/example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
allprojects {
repositories {
google()
mavenCentral()
}
}

rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}

tasks.register("clean", Delete) {
delete rootProject.buildDir
}
21 changes: 0 additions & 21 deletions packages/audio_streamer/example/android/build.gradle.kts

This file was deleted.

4 changes: 3 additions & 1 deletion packages/audio_streamer/example/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Sun Mar 12 17:19:03 CST 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
zipStoreBase=GRADLE_USER_HOME
25 changes: 25 additions & 0 deletions packages/audio_streamer/example/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()

includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.2"
id "com.android.application" version "8.1.0" apply false
id "org.jetbrains.kotlin.android" version "1.9.20" apply false
}

include ":app"
25 changes: 0 additions & 25 deletions packages/audio_streamer/example/android/settings.gradle.kts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,13 @@
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/permission_handler_apple/permission_handler_apple_privacy.bundle",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/permission_handler_apple_privacy.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand All @@ -281,12 +282,13 @@
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/audio_streamer/audio_streamer.framework",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/audio_streamer.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
Expand All @@ -46,7 +45,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
10 changes: 4 additions & 6 deletions packages/audio_streamer/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ import 'package:flutter/material.dart';
import 'package:audio_streamer/audio_streamer.dart';
import 'package:permission_handler/permission_handler.dart';

void main() => runApp(AudioStreamingApp());
void main() => runApp(new AudioStreamingApp());

class AudioStreamingApp extends StatefulWidget {
const AudioStreamingApp({super.key});

@override
AudioStreamingAppState createState() => AudioStreamingAppState();
AudioStreamingAppState createState() => new AudioStreamingAppState();
}

class AudioStreamingAppState extends State<AudioStreamingApp> {
Expand Down Expand Up @@ -83,9 +81,9 @@ class AudioStreamingAppState extends State<AudioStreamingApp> {
margin: EdgeInsets.all(25),
child: Column(children: [
Container(
margin: EdgeInsets.only(top: 20),
child: Text(isRecording ? "Mic: ON" : "Mic: OFF",
style: TextStyle(fontSize: 25, color: Colors.blue)),
margin: EdgeInsets.only(top: 20),
),
Text(''),
Text('Max amp: ${latestBuffer?.reduce(max)}'),
Expand All @@ -96,8 +94,8 @@ class AudioStreamingAppState extends State<AudioStreamingApp> {
])),
floatingActionButton: FloatingActionButton(
backgroundColor: isRecording ? Colors.red : Colors.green,
onPressed: isRecording ? stop : start,
child: isRecording ? Icon(Icons.stop) : Icon(Icons.mic),
onPressed: isRecording ? stop : start,
),
),
);
Expand Down
1 change: 0 additions & 1 deletion packages/audio_streamer/example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: audio_streamer_example
description: Demonstrates how to use the audio_streamer plugin.
publish_to: 'none'
version: 1.0.0+0

environment:
sdk: ">=2.17.0 <4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/audio_streamer/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: audio_streamer
description: Streaming of Pulse-code modulation (PCM) audio from Android and iOS
version: 4.2.1
version: 4.2.2
homepage: https://github.com/cph-cachet/flutter-plugins/tree/master/packages/

environment:
Expand Down