| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Java versions: from Java 17 to Java 21+ (Java 8 to 16 is supported with the jdk8 wrapper and legacy API shown below)
Operating systems: Linux, Windows, MacOS
CPU architectures:
You must install openssl@3 using the brew package manager , then link openssl to /usr/local/opt/openssl
If you don't know how to do this, type the following commands in your terminal:
brew install openssl@3
ln -sf /usr/local/Cellar/openssl@3/3.0.0 /usr/local/opt/opensslIf you are using Maven, edit your pom.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>
<!-- 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_gnu_ssl3, macos_arm64, ... -->
</dependencies>
</project>For Java 8 to 16, replace the tdlight-java dependency above with the following two dependencies. The explicit API selection is required even when Maven itself runs on a newer JDK (for example, when using toolchains):
<dependency>
<groupId>it.tdlight</groupId>
<artifactId>tdlight-java</artifactId>
<classifier>jdk8</classifier>
<exclusions>
<exclusion>
<groupId>it.tdlight</groupId>
<artifactId>tdlight-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>it.tdlight</groupId>
<artifactId>tdlight-api</artifactId>
<classifier>legacy</classifier>
</dependency>Replace VERSION with the latest release version, you can find it here.
If you are using Gradle, add the following lines into your build.gradle file
repositories {
mavenCentral()
maven { url "https://mvn.mchv.eu/repository/mchv/" }
}
dependencies {
// import the BOM
implementation platform('it.tdlight:tdlight-java-bom:VERSION')
// do not specify the versions on the dependencies below!
implementation group: 'it.tdlight', name: 'tdlight-java'
implementation group: 'it.tdlight', name: 'tdlight-natives', classifier: 'linux_amd64_gnu_ssl1'
// Include other native classifiers, for example linux_amd64_clang_ssl3, macos_arm64, ... -->
}For Java 8 to 16, use the following wrapper/API declarations instead:
implementation(group: 'it.tdlight', name: 'tdlight-java', classifier: 'jdk8') {
exclude group: 'it.tdlight', module: 'tdlight-api'
}
implementation group: 'it.tdlight', name: 'tdlight-api', classifier: 'legacy'Replace VERSION with the latest release version, you can find it here.
To use TDLight Java you need to include the native libraries, by specifying one of the following classifier for each tdlight-natives dependency:
Advanced: If you want to use a different precompiled native, please set the java property it.tdlight.native.workdir. (Please note that you must build this, you can't put random precompiled tdlib binaries found on the internet)
An example on how to use TDLight Java can be found here: Example.java
If you want to disable the automatic runtime shutdown hook, you should set the property it.tdlight.enableShutdownHooks to false
TDLight has some extended features compared to TDLib, that you can see on the TDLight official repository.
TDLight is licensed by Andrea Cavalli andrea@cavallium.it under the terms of the GNU Lesser General Public License 3
JTDLib is licensed by Emily Castellotti info@emy.sh under the terms of the GNU Lesser General Public License 3
TDLib is licensed by Aliaksei Levin levlam@telegram.org and Arseny Smirnov arseny30@gmail.com under the terms of the Boost Software License
OpenSSL is licensed under the terms of Apache License v2
Zlib is licensed under the terms of Zlib license
| Back | FazBrowse Home | New Git URL |