Skip to content

Commit bcd82ac

Browse files
committed
bump td to v1.8.47
1 parent 1e04448 commit bcd82ac

24 files changed

Lines changed: 177 additions & 189 deletions

CHANGELOG.md

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

3+
## 0.2.2
4+
5+
* Bump TDLib version to 1.8.47
6+
37
## 0.2.1
48

59
* Bump TDLib version to 1.8.31

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ A flutter plugin for [TDLib JSON interface](https://github.com/tdlib/td#using-fr
1212

1313
| package | td version |
1414
| ------- | ------------------------------------- |
15+
| 0.2.2 | 1.8.47 (Android, iOS, macOS) |
1516
| 0.2.1 | 1.8.31 (Android, iOS, macOS) |
1617
| 0.2.0 | 1.8.30 (Android, iOS, macOS) |
1718
| 0.1.4 | 1.8.1 (Android, iOS, macOS) |
@@ -38,13 +39,15 @@ Make sure you are using supported one
3839
| | x86_64 ||
3940
| | arm64 (M1) ||
4041

42+
⛔ This is related to dylib. You need to have a basic understanding of how to import a dylib. For publishing, you must build a static library instead.
43+
4144
## Installation
4245

4346
- Update `pubspec.yaml`:
4447

4548
```yml
4649
dependencies:
47-
libtdjson: ^0.2.1
50+
libtdjson: ^0.2.2
4851
```
4952
5053
- If you want to build android, you have to add envs for github maven, see `./android/build.gradle`
@@ -77,7 +80,7 @@ Make sure you are using supported one
7780
### Bump TDLib version
7881

7982
- Bump the td version of [android-libtdjson](https://github.com/up9cloud/android-libtdjson)
80-
- Bump the android dependency version in `./android/build.gradle`
83+
- Bump the dependency version in `./android/build.gradle`
8184
- Run `./example` for android
8285

8386
```bash
@@ -86,26 +89,28 @@ Make sure you are using supported one
8689
```
8790

8891
- Bump the td version of [ios-libtdjson](https://github.com/up9cloud/ios-libtdjson)
89-
- Bump the macos dependency version in `./macos/libtdjson.podspec` (s.dependency)
92+
- Bump the dependency version in `./macos/libtdjson.podspec` (s.dependency)
9093
- Run `./example` for macos
9194

9295
```bash
9396
cd ./example/macos
94-
pod update flutter_libtdjson
97+
pod repo remove trunk
98+
pod update
9599
cd ..
96100
flutter run -d macos
97101
```
98102

99-
- Bump the ios dependency version in `./ios/libtdjson.podspec`
103+
- Bump the dependency version in `./ios/libtdjson.podspec`
100104
- Run `./example` for ios simulator
101105

102106
```bash
103107
cd ./example/ios
104-
pod update flutter_libtdjson
108+
pod repo remove trunk
109+
pod update
105110
cd ..
106111
flutter run --debug
107112
# link .dylib to search path, e.q:
108-
# ln -s $(pwd)/build/ios/Debug-iphonesimulator/XCFrameworkIntermediates/flutter_libtdjson/libtdjson.dylib ~/Library/Developer/CoreSimulator/Devices/FD63D560-544B-4B18-8F2F-03B093156DE2/data/Containers/Bundle/Application/004B7B3D-4665-4217-A9C7-2D2193107E80/Runner.app/Frameworks/libtdjson.dylib
113+
# ln -s $(pwd)/build/ios/Debug-iphonesimulator/XCFrameworkIntermediates/flutter_libtdjson/libtdjson.dylib ~/Library/Developer/CoreSimulator/Devices/FD63D560-544B-4B18-8F2F-03B093156DE2/data/Containers/Bundle/Application/428541A3-8A6A-4766-9297-2B6AA4465542/Runner.app/Frameworks/libtdjson.dylib
109114
# Reload with `R`
110115
```
111116
@@ -127,7 +132,3 @@ dart pub publish
127132
# credentials file on macos
128133
cat ~/Library/Application\ Support/dart/pub-credentials.json
129134
```
130-
131-
## TODO
132-
133-
- [ ] ⛔ is about `iOS with dylib`. There are .dylib files in build/ios/Debug-iphonesimulator/XCFrameworkIntermediates, but still...

android/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88
}
99

1010
dependencies {
11-
classpath("com.android.tools.build:gradle:7.3.0")
11+
classpath("com.android.tools.build:gradle:8.9.1")
1212
}
1313
}
1414

@@ -20,8 +20,8 @@ rootProject.allprojects {
2020
name = "GitHubPackages"
2121
url = uri("https://maven.pkg.github.com/up9cloud/android-libtdjson")
2222
credentials {
23-
username = System.getenv("GITHUB_ACTOR")
24-
password = System.getenv("GITHUB_TOKEN")
23+
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR") ?: "up9cloud"
24+
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
2525
}
2626
}
2727
}
@@ -65,5 +65,5 @@ android {
6565
}
6666

6767
dependencies {
68-
implementation "io.github.up9cloud:td:1.8.31"
68+
implementation "io.github.up9cloud:td:1.8.47"
6969
}

example/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Demonstrates how to use the libtdjson plugin.
1717
- Follow the plugin [installation](https://github.com/up9cloud/flutter_libtdjson)
1818
- To get the device id by running `flutter devices`
1919
- `flutter run -d <device id>`, e.q. flutter run -d emulator-5554
20+
- if the target device not exist, launch the emulator: `flutter emulators`, `flutter emulators --launch <id>`
2021

2122
## Dev memo
2223

@@ -27,14 +28,11 @@ flutter create -a java --template plugin --platforms android --project-name libt
2728
rm -fr android
2829
mv ./_tmp/example/android .
2930
rm -fr _tmp
31+
# remember add the permission back to file `./android/app/src/main/AndroidManifest.xml`
3032
```
3133

3234
### Run android
3335

34-
```txt
35-
36-
```
37-
3836
```bash
3937
flutter run -d emulator-5554
4038
```

example/android/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ gradle-wrapper.jar
55
/gradlew.bat
66
/local.properties
77
GeneratedPluginRegistrant.java
8+
.cxx/
89

910
# Remember to never publicly share your keystore.
10-
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11+
# See https://flutter.dev/to/reference-keystore
1112
key.properties
1213
**/*.keystore
1314
**/*.jks

example/android/app/build.gradle

Lines changed: 0 additions & 58 deletions
This file was deleted.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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")
6+
}
7+
8+
android {
9+
namespace = "io.github.up9cloud.libtdjson_example"
10+
compileSdk = flutter.compileSdkVersion
11+
ndkVersion = flutter.ndkVersion
12+
13+
compileOptions {
14+
sourceCompatibility = JavaVersion.VERSION_11
15+
targetCompatibility = JavaVersion.VERSION_11
16+
}
17+
18+
kotlinOptions {
19+
jvmTarget = JavaVersion.VERSION_11.toString()
20+
}
21+
22+
defaultConfig {
23+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
24+
applicationId = "io.github.up9cloud.libtdjson_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
31+
}
32+
33+
buildTypes {
34+
release {
35+
// TODO: Add your own signing config for the release build.
36+
// Signing with the debug keys for now, so `flutter run --release` works.
37+
signingConfig = signingConfigs.getByName("debug")
38+
}
39+
}
40+
}
41+
42+
flutter {
43+
source = "../.."
44+
}

example/android/build.gradle

Lines changed: 0 additions & 18 deletions
This file was deleted.

example/android/build.gradle.kts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
allprojects {
2+
repositories {
3+
google()
4+
mavenCentral()
5+
}
6+
}
7+
8+
val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get()
9+
rootProject.layout.buildDirectory.value(newBuildDir)
10+
11+
subprojects {
12+
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
13+
project.layout.buildDirectory.value(newSubprojectBuildDir)
14+
}
15+
subprojects {
16+
project.evaluationDependsOn(":app")
17+
}
18+
19+
tasks.register<Delete>("clean") {
20+
delete(rootProject.layout.buildDirectory)
21+
}

example/android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
1+
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
33
android.enableJetifier=true

0 commit comments

Comments
 (0)