Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.DaoCloud:dce-plugin-sdk-java:0.1'
}
dependencies {
implementation("com.github.DaoCloud:dce-plugin-sdk-java:0.1")
}
<dependency>
<groupId>com.github.DaoCloud</groupId>
<artifactId>dce-plugin-sdk-java</artifactId>
<version>0.1</version>
</dependency>
libraryDependencies += "com.github.DaoCloud" % "dce-plugin-sdk-java" % "0.1"
:dependencies [[com.github.DaoCloud/dce-plugin-sdk-java "0.1"]]
DCE plugin SDK for Java.
Put this in your pom.xml
:
<repositories>
<repository>
<id>dce-plugin-sdk</id>
<url>https://raw.github.com/DaoCloud/dce-plugin-sdk-java/mvn-repo/</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>io.daocloud.dce</groupId>
<artifactId>dce-plugin-sdk</artifactId>
<version>0.1</version>
</dependency>
<dependencies>
You can use this SDK to save your plugin's config. config should not bigger than 1MB.
package io.daocloud.test;
import io.daocloud.dce.PluginSDK;
import org.json.JSONObject;
import java.util.HashMap;
public class SDKTest {
public static void main(String[] args) {
PluginSDK sdk = new PluginSDK();
HashMap<String, String> config = new HashMap<String, String>();
config.put("name", "Hello, World");
JSONObject jsonConfig = new JSONObject(config);
JSONObject setted = sdk.SetConfig(jsonConfig);
JSONObject getted = sdk.GetConfig();
}
}
dce-plugin-sdk-java is licensed under the MIT License - see the LICENSE file for details