44
55Prebuilt [ libtdjson] ( https://github.com/tdlib/td ) for Android
66
7- ` Version ` tag is same as the version of tdlib
7+ > Version
8+
9+ - Git tag is same as the version of tdlib
810
911> Releases
1012
@@ -28,94 +30,72 @@ Prebuilt [libtdjson](https://github.com/tdlib/td) for Android
2830
2931> Method 1: Download jniLibs
3032
31- - Download jniLibs.tar.gz (from ` Releases ` ) and extract it to your ./app/` src/main/jniLibs/ `
32- - Copy ` ./app/src/main/java/io/github/up9cloud/td/JsonClient.java ` to your repo
33-
34- > TODO: Method 2: Download .jar
35-
36- - Download .jar file (from ` Packages ` ) to your ./app/` libs/ `
37- - Be sure "* .jar" is the part of dependencies in your ` build.gradle ` file
38-
39- ``` gradle
40- dependencies {
41- implementation fileTree(dir: "libs", include: ["*.jar"])
42- }
43- ```
33+ - Download ` jniLibs.tar.gz ` (from ` Releases ` ) and extract it to your ./app/` src/main/jniLibs/ `
34+ - Download ` ./app/src/main/java/io/github/up9cloud/td/JsonClient.java ` and put to your code base.
4435
45- > Method 3 : Github Maven
36+ > Method 2 : Github Maven
4637
4738- Add those to your ` build.gradle ` file
4839
49- ```gradle
50- repositories {
51- google()
52- ...
53- maven {
54- name = "GitHubPackages"
55- url = uri("https://maven.pkg.github.com/up9cloud/android-libtdjson")
56- credentials {
57- username = System.getenv("GITHUB_ACTOR")
58- password = System.getenv("GITHUB_TOKEN")
59- }
60- }
40+ ``` gradle
41+ repositories {
42+ google()
43+ ...
44+ maven {
45+ name = "GitHubPackages"
46+ url = uri("https://maven.pkg.github.com/up9cloud/android-libtdjson")
47+ credentials {
48+ username = System.getenv("GITHUB_ACTOR")
49+ password = System.getenv("GITHUB_TOKEN")
50+ }
6151 }
62- dependencies {
63- // Modify the version, see release
64- implementation 'io.github.up9cloud:td:<version>'
65- }
66- ```
52+ }
53+ dependencies {
54+ // Modify the version, see release
55+ implementation 'io.github.up9cloud:td:<version>'
56+ }
57+ ```
6758
6859- Setup ENVs
6960
70- ```bash
71- export GITHUB_ACTOR=<your github account>
72- export GITHUB_TOKEN=<your github personal access token>
73- ```
61+ ``` bash
62+ export GITHUB_ACTOR=< your github account>
63+ export GITHUB_TOKEN=< your github personal access token>
64+ ```
7465
7566Other refs:
7667
7768- GitHub Docs - [ Gradle registry] ( https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry#installing-a-package )
7869- [ enefce/AndroidLibraryForGitHubPackagesDemo] ( https://github.com/enefce/AndroidLibraryForGitHubPackagesDemo )
7970
80- ## Usage
81-
82- TODO
83-
84- ## Example
85-
86- TODO
87-
8871## Dev memo
8972
90- ### Bump the version of tdlib
91-
92- - Modify the version for git checkout in `./prepare.sh`
93- - Modify the getVersionName function in `./app/build.gradle`
94- - Git commit (message example: `bump td to vx.x.x`)
95- - Git add tag (`git tag vx.x.x`, the tag version should be same as the version of tdlib)
96- - Push with tags (`git push && git push --tags`)
97- - Wait for CI task
98-
99- ### Build on local, see `.github/workflows/main.yml` also
100-
101- ```console
102- $ docker run --rm -it -v `pwd`:/app sstc/android-ndk /bin/bash
103-
104- # ./build.sh
105- ```
106-
107- ### Cleanup generated .so files for strip testing
108-
109- ``` bash
110- rm -fr \
73+ - Bump the version of tdlib
74+ - Modify the version for git checkout in ` ./prepare.sh `
75+ - Modify the getVersionName function in ` ./app/build.gradle `
76+ - Git commit (message example: ` bump td to vx.x.x ` )
77+ - Git add tag (` git tag vx.x.x ` , the tag version should be same as the version of tdlib)
78+ - Push with tags (` git push && git push --tags ` )
79+ - Wait for CI task
80+ - Build on local, see ` .github/workflows/main.yml ` also
81+
82+ ``` bash
83+ # cleanup generated .so files for strip testing
84+ rm -fr \
11185 ./build/jni/** /* .so \
11286 ./build/jni/** /td/* .so \
11387 ./build/td/** /* .so \
11488 ./jniLibs \
11589 ./libs
11690
117- ./build.sh
118- ```
91+ docker run --rm -v $( pwd) :/app sstc/android-ndk ./build.sh
92+ ```
93+
94+ - update gradle
95+
96+ ``` bash
97+ docker run --rm -v $( pwd) :/app sstc/android-ndk ./gradlew wrapper --gradle-version latest
98+ ```
11999
120100- ` .travis.yml ` : Travis CI has build time limitation (1 hour), and building this lib needs much more than it, so can't build on it.
121101
0 commit comments