Skip to content

cloudio-project/cloudio-endpoint-java

Repository files navigation

cloudio-endpoint-java Build Status Download

Java endpoint (IoT device) library for cloud.iO.

Documentation

The online javadoc Documentation can be found here.

How to use

First of all you need to add the dependency to the cloud.iO endpoint library to your Java project. The following chapters show how to configure your gradle or maven projects in order to use cloud.iO.

Gradle

You first need to authenticate to github packages. There are 2 solutions:

Properties file

Add a "gradle.properties" file in the same directory as the "build.gradle" file.

gpr.user=Your_user_name_without_quotes
gpr.key=Your_api_key_without_quotes

Environment variable

You can define a "GPR_USER" and a "GPR_API_KEY" as environment variables.

build.gradle file

repositories {
    maven {
        name = "GitHubPackages"
        url = uri("https://maven.pkg.github.com/cloudio-project/cloudio-endpoint-java")
            credentials {
                username = project.findProperty("gpr.user") ?: System.getenv("GPR_USER")
                password = project.findProperty("gpr.key") ?: System.getenv("GPR_API_KEY")
            }
    }
}

dependencies {
    compile "ch.hevs.cloudio:cloudio-endpoint-java:0.1.6"
}

Maven

You first need to authenticate to github packages. More informations here.

    <dependencies>
      <dependency>
        <groupId>ch.hevs.cloudio</groupId>
        <artifactId>cloudio-endpoint-java</artifactId>
        <version>0.1.6</version>
      </dependency>
    </dependencies>

Using development snapshots

If you need the latest development snapshot, use these gradle/maven dependencies:

Gradle

You first need to authenticate to github packages. There are 2 solutions:

Properties file

Add a "gradle.properties" file in the same directory as the "build.gradle" file.

gpr.user=Your_user_name_without_quotes
gpr.key=Your_api_key_without_quotes

Environment variable

You can define a "GPR_USER" and a "GPR_API_KEY" as environment variables.

build.gradle file

repositories {
    maven {
        name = "GitHubPackages"
        url = uri("https://maven.pkg.github.com/cloudio-project/cloudio-endpoint-java")
            credentials {
                username = project.findProperty("gpr.user") ?: System.getenv("GPR_USER")
                password = project.findProperty("gpr.key") ?: System.getenv("GPR_API_KEY")
            }
    }
}

dependencies {
    compile "ch.hevs.cloudio:cloudio-endpoint-java:0.2.0-SNAPSHOT"
}

Maven

You first need to authenticate to github packages. More informations here.

    <dependencies>
      <dependency>
        <groupId>ch.hevs.cloudio</groupId>
        <artifactId>cloudio-endpoint-java</artifactId>
        <version>0.2.0-SNAPSHOT</version>
      </dependency>
    </dependencies>