Skip to content

Commit

Permalink
bump td to v1.8.30
Browse files Browse the repository at this point in the history
  • Loading branch information
up9cloud committed Jun 16, 2024
1 parent 1f2a2f4 commit 3623146
Show file tree
Hide file tree
Showing 38 changed files with 886 additions and 507 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: k-paxian/dart-package-publisher@v1.3
- uses: actions/checkout@v4
- uses: k-paxian/dart-package-publisher@v1.6
id: flutter_publish
with:
accessToken: ${{ secrets.FLUTTER_PUB_ACCESS_TOKEN }}
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 0.2.0

* Bump TDLib version to 1.8.30

## 0.1.4

* Bump TDLib version to 1.8.1
Expand Down
43 changes: 27 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ A flutter plugin for [TDLib JSON interface](https://github.com/tdlib/td#using-fr

## Lib versions

| package | td |
| ------- | ------------------------------------ |
| 0.1.4 | 1.8.1 (Android, iOS, macOS) |
| 0.1.3 | 1.7.9 (Android, iOS, macOS) |
| 0.1.2 | 1.7.0 (Android), latest (iOS, macOS) |
| package | td version |
| ------- | ------------------------------------- |
| 0.2.0 | 1.8.30 (Android, iOS, macOS) |
| 0.1.4 | 1.8.1 (Android, iOS, macOS) |
| 0.1.3 | 1.7.9 (Android, iOS, macOS) |
| 0.1.2 | 1.7.0 (Android), latest (iOS, macOS) |

## Supported architectures

Expand All @@ -20,14 +21,14 @@ Make sure you are using supported one
| ---------------- | ------------ | --- |
| Android | armeabi-v7a ||
| | arm64-v8a ||
| Android emulator | x86 | |
| Android emulator | x86 | |
| | x86_64 ||
| iOS | armv7 ||
| | armv7s ||
| | arm64 | |
| | arm64 | |
| iOS simulator | i386 ||
| | x86_64 | |
| | arm64 (M1) | |
| | x86_64 | |
| | arm64 (M1) | |
| macOS | i386 ||
| | x86_64 ||
| | arm64 (M1) ||
Expand All @@ -38,7 +39,7 @@ Make sure you are using supported one

```yml
dependencies:
libtdjson: ^0.1.4
libtdjson: ^0.2.0
```
- If you want to build android, you have to add envs for github maven, see `./android/build.gradle`
Expand Down Expand Up @@ -68,7 +69,7 @@ Make sure you are using supported one

## Dev memo

> Bump TDLib version
### Bump TDLib version

- Bump the td version of [android-libtdjson](https://github.com/up9cloud/android-libtdjson)
- Bump the android dependency version in `./android/build.gradle`
Expand All @@ -80,27 +81,37 @@ Make sure you are using supported one
```

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

```bash
cd ./example/macos
pod update flutter_libtdjson
cd ..
flutter run -d macos`
flutter run -d macos
```

- Bump the ios dependency version in `./ios/libtdjson.podspec`
- Run `./example` for ios
- Run `./example` for ios simulator

```bash
cd ./example/ios
pod update flutter_libtdjson
cd ..
flutter run -d "iPhone 13"
flutter run --debug
# link .dylib to search path, e.q:
# 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/3D0AD268-62C8-4A78-91AF-C3966EA8027B/Runner.app/Frameworks/libtdjson.dylib
# Reload with `R`
```
- Bump the package version in `./pubspec.yaml`
- Add changelog for new version in `./CHANGELOG.md`
- Bump version info in `./README.md`
- Commit, add tag and push
- Git commit (message example: `bump td to vx.x.x`)
- Git add tag (`git tag vx.x.x`, the tag version should be same as the version in pubspec.yaml)
- Push with tags (`git push && git push --tags`)
- Wait for CI task

## TODO

- [ ] ⛔ is about `iOS with dylib`. There are .dylib files in build/ios/Debug-iphonesimulator/XCFrameworkIntermediates, but still...
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'com.android.tools.build:gradle:7.2.0'
}
}

Expand All @@ -30,7 +30,7 @@ rootProject.allprojects {
apply plugin: 'com.android.library'

android {
compileSdkVersion 30
compileSdkVersion 33

defaultConfig {
minSdkVersion 16
Expand All @@ -41,5 +41,5 @@ android {
}

dependencies {
implementation "io.github.up9cloud:td:1.8.1"
implementation "io.github.up9cloud:td:1.8.30"
}
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
distributionUrl=https://services.gradle.org/distributions/gradle-7.5-all.zip
60 changes: 38 additions & 22 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,23 @@ Demonstrates how to use the libtdjson plugin.

## Dev memo

### ios: Exception: Error running pod install
### Regenerate ./android

```bash
cd ios
rm Podfile.lock
pod install --repo-update
cd ..
./ios_cleanup_run.sh
flutter create -a java --template plugin --platforms android --project-name libtdjson --org io.github.up9cloud.libtdjson _tmp
rm -fr android
mv ./_tmp/example/android .
rm -fr _tmp
```

### macos: Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
### Run android

```bash
cd macos
rm Podfile.lock
pod install --repo-update
cd ..
flutter run -d macos
```
```txt
### Regenerate ./android
```

```bash
flutter create -a java --template plugin --platforms android --project-name libtdjson --org io.github.up9cloud.libtdjson _tmp
rm -fr android
mv ./_tmp/example/android .
rm -fr _tmp
flutter run -d emulator-5554
```

### Regenerate ./ios
Expand All @@ -58,6 +48,22 @@ mv ./_tmp/example/ios .
rm -fr _tmp
```

### ios: Exception: Error running pod install

```bash
cd ios
rm Podfile.lock
pod install --repo-update
cd ..
./ios_cleanup_run.sh
```

### ios: Error: Undefined symbols for ...

```bash
./ios_cleanup_run.sh
```

### Regenerate ./macos

```bash
Expand All @@ -67,6 +73,8 @@ mv ./_tmp/example/macos .
rm -fr _tmp
```

### Run macos

Add following part to `./macos/Runner/DebugProfile.entitlements`, see [setup entitlements](https://flutter.dev/desktop#setting-up-entitlements)

```xml
Expand All @@ -76,13 +84,21 @@ Add following part to `./macos/Runner/DebugProfile.entitlements`, see [setup ent
</dict>
```

### Error: Undefined symbols for ...
```bash
flutter run -d macos
```

### macos: Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.

```bash
./ios_cleanup_run.sh
cd macos
rm Podfile.lock
pod install --repo-update
cd ..
flutter run -d macos
```

### [!] CocoaPods could not find compatible versions for pod "flutter_libtdjson": In snapshot (Podfile.lock)
### macos: [!] CocoaPods could not find compatible versions for pod "flutter_libtdjson": In snapshot (Podfile.lock)

```bash
pod repo update
Expand Down
4 changes: 2 additions & 2 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 31
compileSdkVersion 33

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "io.github.up9cloud.libtdjson.libtdjson_example"
minSdkVersion 16
minSdkVersion flutter.minSdkVersion
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down
11 changes: 2 additions & 9 deletions example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand All @@ -38,4 +29,6 @@
android:name="flutterEmbedding"
android:value="2" />
</application>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
</manifest>
4 changes: 2 additions & 2 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'com.android.tools.build:gradle:7.2.0'
}
}

Expand All @@ -22,6 +22,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
distributionUrl=https://services.gradle.org/distributions/gradle-7.5-all.zip
2 changes: 1 addition & 1 deletion example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
<string>12.0</string>
</dict>
</plist>
5 changes: 4 additions & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down Expand Up @@ -29,6 +29,9 @@ flutter_ios_podfile_setup

target 'Runner' do
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
# target 'RunnerTests' do
# inherit! :search_paths
# end
end

post_install do |installer|
Expand Down
41 changes: 24 additions & 17 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
PODS:
- Flutter (1.0.0)
- flutter_libtdjson (0.2.2)
- flutter_libtdjson (0.4.1)
- libtdjson (0.0.1):
- Flutter
- flutter_libtdjson (= 0.2.2)
- path_provider_ios (0.0.1):
- flutter_libtdjson (= 0.4.1)
- package_info_plus (0.4.5):
- Flutter
- "permission_handler (5.1.0+2)":
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- permission_handler_apple (9.1.1):
- Flutter

DEPENDENCIES:
- Flutter (from `Flutter`)
- libtdjson (from `.symlinks/plugins/libtdjson/ios`)
- path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
- permission_handler (from `.symlinks/plugins/permission_handler/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)

SPEC REPOS:
trunk:
Expand All @@ -24,18 +28,21 @@ EXTERNAL SOURCES:
:path: Flutter
libtdjson:
:path: ".symlinks/plugins/libtdjson/ios"
path_provider_ios:
:path: ".symlinks/plugins/path_provider_ios/ios"
permission_handler:
:path: ".symlinks/plugins/permission_handler/ios"
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
permission_handler_apple:
:path: ".symlinks/plugins/permission_handler_apple/ios"

SPEC CHECKSUMS:
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
flutter_libtdjson: 12ff08bbe6832d8c9eb89b17cf106fc06e887eff
libtdjson: 5065f450b7fd9505e4863a6357437d5460db10ff
path_provider_ios: 7d7ce634493af4477d156294792024ec3485acd5
permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_libtdjson: 731f3cc7b4b5e17c91a9032001e32fff2bfdea1b
libtdjson: a7c78ca7ed957cafd19a1f37b3241fe0d90aa616
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6

PODFILE CHECKSUM: 8e679eca47255a8ca8067c4c67aab20e64cb974d
PODFILE CHECKSUM: 7096d69c085921256031c0b77f50e3baf9b14e24

COCOAPODS: 1.11.2
COCOAPODS: 1.15.2
Loading

0 comments on commit 3623146

Please sign in to comment.