- Notifications
You must be signed in to change notification settings - Fork49
Complete Bot and Userbot Telegram library based on TDLib
License
tdlight-team/tdlight-java
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Java versions: from Java 17 to Java 21+ (Java 8 to 16 is supported if you use the following dependency classifier:jdk8)
Operating systems: Linux, Windows, MacOS
CPU architectures:
- amd64 (Linux, Windows, MacOS)
- armhf (Linux)
- arm64 (Linux, MacOS)
- ppc64el (Linux)
- riscv64 (linux)
- Linux: OpenSSL1/OpenSSL3, zlib, (libc++ if you use clang)
- MacOS: OpenSSL
- Windows:Microsoft Visual C++ Redistributable
You must installopenssl@3 using thebrew package manager, then link opensslto/usr/local/opt/openssl
If you don't know how to do this, type the following commands in your terminal:
brew install openssl@3ln -sf /usr/local/Cellar/openssl@3/3.0.0 /usr/local/opt/openssl
If you are using Maven, edit yourpom.xml file as below:
<project><repositories><!-- Add the following repository--><repository><id>mchv</id><name>MCHV Apache Maven Packages</name><url>https://mvn.mchv.eu/repository/mchv/</url></repository></repositories><dependencyManagement><dependencies><!-- Add the following dependency--><dependency><groupId>it.tdlight</groupId><artifactId>tdlight-java-bom</artifactId><version>VERSION</version><type>pom</type><scope>import</scope></dependency></dependencies></dependencyManagement><dependencies><!-- Add the following dependencies--><dependency><groupId>it.tdlight</groupId><artifactId>tdlight-java</artifactId><!-- Java 8 is supported if you use the following dependency classifier: <classifier>jdk8</classifier>--><!-- don't specify the version here--></dependency><!-- Example linux amd64 (GNU GCC) ssl1 natives--><dependency><groupId>it.tdlight</groupId><artifactId>tdlight-natives</artifactId><classifier>linux_amd64_gnu_ssl1</classifier><!-- don't specify the version here--></dependency><!-- Example windows amd64 natives--><dependency><groupId>it.tdlight</groupId><artifactId>tdlight-natives</artifactId><classifier>windows_amd64</classifier><!-- don't specify the version here--></dependency><!-- ...--><!-- Include other native classifiers, for example linux_amd64_ssl3, macos_amd64, ...--></dependencies></project>
ReplaceVERSION with the latest release version, you can findithere.
If you are using Gradle, add the following lines into yourbuild.gradle file
repositories {maven { url"https://mvn.mchv.eu/repository/mchv/" }}dependencies {// import the BOMimplementation platform('it.tdlight:tdlight-java-bom:VERSION')// do not specify the versions on the dependencies below!implementationgroup:'it.tdlight',name:'tdlight-java'// Java 8 is supported if you use the following dependency classifier: `jdk8`implementationgroup:'it.tdlight',name:'tdlight-natives',classifier:'linux_amd64_gnu_ssl1'// Include other native classifiers, for example linux_amd64_clang_ssl3, macos_amd64, ... -->}ReplaceVERSION with the latest release version, you can findithere.
To use TDLight Java you need to include the native libraries, by specifying one of the following classifier for each tdlight-natives dependency:
linux_amd64_clang_ssl3linux_amd64_gnu_ssl1linux_amd64_gnu_ssl3linux_arm64_clang_ssl3linux_arm64_gnu_ssl1linux_arm64_gnu_ssl3linux_armhf_gnu_ssl1linux_armhf_gnu_ssl3linux_ppc64el_gnu_ssl3linux_riscv64_gnu_ssl3windows_amd64macos_arm64macos_amd64
Advanced: If you want to use a different precompiled native, please set the java propertyit.tdlight.native.workdir. (Please note that you must buildthis, you can't put random precompiled tdlib binaries found on the internet)
An example on how to use TDLight Java can be foundhere:Example.java
If you want to disable the automatic runtime shutdown hook, you should set the propertyit.tdlight.enableShutdownHookstofalse
TDLight has some extended features compared to TDLib, that you can see ontheTDLight official repository.
TDLight is licensed by Andrea Cavalliandrea@cavallium.it under the terms of the GNU Lesser General Public License 3
JTDLib is licensed by Emily Castellottiinfo@emy.sh under the terms of the GNU Lesser General PublicLicense 3
TDLib is licensed by Aliaksei Levinlevlam@telegram.org and Arseny Smirnovarseny30@gmail.com under the terms of theBoost Software License
OpenSSL is licensed under the terms of Apache License v2
Zlib is licensed under the terms of Zlib license
About
Complete Bot and Userbot Telegram library based on TDLib
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
