Skip to content

Commit 977fd91

Browse files
authored
release: 2.3.1+hotfix.1. (#650)
* release: 2.3.1+hotfix.1. * fix version consistency checking for hotfix. * update CHANGELOG. * fix android build. * fix.
1 parent 346f00c commit 977fd91

File tree

10 files changed

+111
-93
lines changed

10 files changed

+111
-93
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# CHANGELOG
22

3+
## 2.3.1+hotfix.1
4+
5+
* Fix version mismatch for CocoaPods (#648)
6+
* Android AGP upgrade (#649)
7+
38
## 2.3.0
49

510
* fix: Fixed speaker cannot be switched on iOS. (#617)

android/build.gradle

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,70 @@
1-
group 'io.livekit.plugin'
2-
version '1.0-SNAPSHOT'
1+
group = "io.livekit.plugin"
2+
version = "1.0-SNAPSHOT"
33

44
buildscript {
5-
ext.kotlin_version = '1.7.10'
5+
ext.kotlin_version = "1.8.22"
66
repositories {
77
google()
88
mavenCentral()
99
}
1010

1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:7.1.1'
13-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
12+
classpath("com.android.tools.build:gradle:8.1.0")
13+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
1414
}
1515
}
1616

17-
rootProject.allprojects {
17+
allprojects {
1818
repositories {
1919
google()
2020
mavenCentral()
2121
}
2222
}
2323

24-
apply plugin: 'com.android.library'
25-
apply plugin: 'kotlin-android'
24+
apply plugin: "com.android.library"
25+
apply plugin: "kotlin-android"
2626

2727
android {
28-
compileSdkVersion 31
29-
30-
namespace 'io.livekit.plugin'
31-
28+
if (project.android.hasProperty("namespace")) {
29+
namespace = "io.livekit.pluginn"
30+
}
31+
32+
compileSdk = 34
33+
3234
compileOptions {
33-
sourceCompatibility JavaVersion.VERSION_1_8
34-
targetCompatibility JavaVersion.VERSION_1_8
35+
sourceCompatibility = JavaVersion.VERSION_1_8
36+
targetCompatibility = JavaVersion.VERSION_1_8
3537
}
3638

3739
kotlinOptions {
38-
jvmTarget = '1.8'
40+
jvmTarget = JavaVersion.VERSION_1_8
3941
}
4042

4143
sourceSets {
42-
main.java.srcDirs += 'src/main/kotlin'
44+
main.java.srcDirs += "src/main/kotlin"
45+
test.java.srcDirs += "src/test/kotlin"
4346
}
4447

4548
defaultConfig {
46-
minSdkVersion 16
49+
minSdk = 21
4750
}
48-
}
4951

50-
dependencies {
51-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
52+
dependencies {
53+
testImplementation("org.jetbrains.kotlin:kotlin-test")
54+
testImplementation("org.mockito:mockito-core:5.0.0")
55+
implementation 'io.github.webrtc-sdk:android:125.6422.03'
56+
implementation 'com.github.paramsen:noise:2.0.0'
57+
}
58+
59+
testOptions {
60+
unitTests.all {
61+
useJUnitPlatform()
62+
63+
testLogging {
64+
events "passed", "skipped", "failed", "standardOut", "standardError"
65+
outputs.upToDateWhen {false}
66+
showStandardStreams = true
67+
}
68+
}
69+
}
5270
}

example/android/app/build.gradle

Lines changed: 23 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,44 @@
1-
def localProperties = new Properties()
2-
def localPropertiesFile = rootProject.file('local.properties')
3-
if (localPropertiesFile.exists()) {
4-
localPropertiesFile.withReader('UTF-8') { reader ->
5-
localProperties.load(reader)
6-
}
7-
}
8-
9-
def flutterRoot = localProperties.getProperty('flutter.sdk')
10-
if (flutterRoot == null) {
11-
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5+
id "dev.flutter.flutter-gradle-plugin"
126
}
137

14-
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15-
if (flutterVersionCode == null) {
16-
flutterVersionCode = '1'
17-
}
18-
19-
def flutterVersionName = localProperties.getProperty('flutter.versionName')
20-
if (flutterVersionName == null) {
21-
flutterVersionName = '1.0'
22-
}
23-
24-
apply plugin: 'com.android.application'
25-
apply plugin: 'kotlin-android'
26-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27-
288
android {
29-
compileSdkVersion 34
9+
namespace = "io.livekit.example"
10+
compileSdk = flutter.compileSdkVersion
11+
ndkVersion = flutter.ndkVersion
3012

31-
sourceSets {
32-
main.java.srcDirs += 'src/main/kotlin'
13+
compileOptions {
14+
sourceCompatibility = JavaVersion.VERSION_1_8
15+
targetCompatibility = JavaVersion.VERSION_1_8
3316
}
3417

35-
// compileOptions {
36-
// sourceCompatibility JavaVersion.VERSION_1_8
37-
// targetCompatibility JavaVersion.VERSION_1_8
38-
// }
18+
kotlinOptions {
19+
jvmTarget = JavaVersion.VERSION_1_8
20+
}
3921

4022
defaultConfig {
4123
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
42-
applicationId "io.livekit.example"
43-
minSdkVersion 21
44-
targetSdkVersion 34
45-
versionCode flutterVersionCode.toInteger()
46-
versionName flutterVersionName
24+
applicationId = "io.livekit.example"
25+
// You can update the following values to match your application needs.
26+
// For more information, see: https://flutter.dev/to/review-gradle-config.
27+
minSdk = flutter.minSdkVersion
28+
targetSdk = flutter.targetSdkVersion
29+
versionCode = flutter.versionCode
30+
versionName = flutter.versionName
4731
}
4832

4933
buildTypes {
5034
release {
5135
// TODO: Add your own signing config for the release build.
5236
// Signing with the debug keys for now, so `flutter run --release` works.
53-
signingConfig signingConfigs.debug
37+
signingConfig = signingConfigs.debug
5438
}
5539
}
5640
}
5741

5842
flutter {
59-
source '../..'
60-
}
61-
62-
dependencies {
63-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
43+
source = "../.."
6444
}

example/android/build.gradle

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,16 @@
1-
buildscript {
2-
ext.kotlin_version = '1.7.10'
3-
repositories {
4-
google()
5-
jcenter()
6-
}
7-
8-
dependencies {
9-
classpath 'com.android.tools.build:gradle:7.1.1'
10-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11-
}
12-
}
13-
141
allprojects {
152
repositories {
163
google()
17-
jcenter()
4+
mavenCentral()
185
}
196
}
207

21-
rootProject.buildDir = '../build'
8+
rootProject.buildDir = "../build"
229
subprojects {
2310
project.buildDir = "${rootProject.buildDir}/${project.name}"
24-
project.evaluationDependsOn(':app')
11+
}
12+
subprojects {
13+
project.evaluationDependsOn(":app")
2514
}
2615

2716
tasks.register("clean", Delete) {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Fri Jun 23 08:50:38 CEST 2017
1+
#Thu Nov 14 15:55:14 CST 2024
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip

example/android/settings.gradle

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
1-
include ':app'
1+
pluginManagement {
2+
def flutterSdkPath = {
3+
def properties = new Properties()
4+
file("local.properties").withInputStream { properties.load(it) }
5+
def flutterSdkPath = properties.getProperty("flutter.sdk")
6+
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7+
return flutterSdkPath
8+
}()
29

3-
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4-
def properties = new Properties()
10+
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
511

6-
assert localPropertiesFile.exists()
7-
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
12+
repositories {
13+
google()
14+
mavenCentral()
15+
gradlePluginPortal()
16+
}
17+
}
818

9-
def flutterSdkPath = properties.getProperty("flutter.sdk")
10-
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11-
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
19+
plugins {
20+
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21+
id "com.android.application" version '8.7.2' apply false
22+
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
23+
}
24+
25+
include ":app"

ios/livekit_client.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ Pod::Spec.new do |s|
1616
s.static_framework = true
1717

1818
s.dependency 'Flutter'
19-
s.dependency 'WebRTC-SDK', '125.6422.05'
19+
s.dependency 'WebRTC-SDK', '125.6422.06'
2020
end

macos/livekit_client.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ Pod::Spec.new do |s|
1616
s.static_framework = true
1717

1818
s.dependency 'FlutterMacOS'
19-
s.dependency 'WebRTC-SDK', '125.6422.05'
19+
s.dependency 'WebRTC-SDK', '125.6422.06'
2020
end

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
name: livekit_client
1616
description: Flutter Client SDK for LiveKit.
1717
Build real-time video and audio into your apps. Supports iOS, Android, and Web.
18-
version: 2.3.1
18+
version: 2.3.1+hotfix.1
1919
homepage: https://github.com/livekit/client-sdk-flutter
2020

2121
environment:

scripts/check_version.dart

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,19 @@ import 'package:yaml/yaml.dart';
55
void main() {
66
File pubspec = File('pubspec.yaml');
77
var doc = loadYaml(pubspec.readAsStringSync());
8-
var version = doc['version'];
8+
var versionStr = doc['version'];
9+
10+
RegExpMatch? match = RegExp(r'(\d+\.\d+\.\d+)').firstMatch(versionStr);
11+
12+
var version = match?[0];
13+
14+
if (version == null) {
15+
// ignore: avoid_print
16+
print('Could not find version in pubspec.yaml');
17+
exit(1);
18+
}
19+
20+
print('Checking version $version');
921

1022
var files = [
1123
'ios/livekit_client.podspec',

0 commit comments

Comments
 (0)