DD@Home in Java
use java -jar DDatJava-<verison>.jar
There are many use way in DDCore class.
If you think launch like the Plain Launch, see Bootstrap.kt file.
- Clone this project to an empty folder with Terminal.
Such asgit clone https://github.com/dd-center/DDatJava.git - Run
gradlew publishToMavenLocal
If you're using PowerShell, use.\gradlew publishToMavenLocal - Go to your project and open the
build.gradle. - Add
mavenLocal()in yourrepositoriesscope.
Addimplementation("moe.vtbs:dd-home-api:<version>") - Sync your project.
For Gradle's step 1~2- Go to your project and open the
pom.xml. - Add this:
<dependencies>
<!--Other...-->
<dependency>
<groupId>moe.vtbs</groupId>
<artifactId>dd-home-api</artifactId>
<version>VERSION</version>
</dependency>
<!--Other...-->
</dependencies>- Sync your project.
- Run
gradlew jar - Copy the
.\build\libs\DDatJava-<version>.jarto your project.
If you want to use the DDatJava-<version>-api.jarand the following steps are also required:
- Add they to classpath:
- com.google.code.gson:gson:2.9.0
- org.slf4j:slf4j-log4j12:1.7.36
- commons-io:commons-io:2.11.0
- org.yaml:snakeyaml:1.30
- com.squareup.okhttp3:okhttp:4.10.0
- org.jetbrains.kotlin:kotlin-stdlib:1.7.0
- org.jetbrains.kotlin:kotlin-reflect:1.7.0
- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.2
You can find the config file at ./conf/config.yml after first times launching.
#Vtbs网站任务分发设置
distribution:
#操作间隔,单位为秒
#默认值为 120
interval: 120
#昵称
nickname: <unset>
#Language. Such as: zh-cn, en-us
#If you want to use another language, please place the "<languageName>.ini" file under Classpath://lang/
language: zh-cndistribution.interval is in second(s), not in millisecond(ms).
distribution.nickname is a custom nickname, it will ask you to fill in on first boot.