-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change namespace from "com.github.davidepianca98" to "io.github.david…
…epianca98"
- Loading branch information
1 parent
ef25a74
commit eff347b
Showing
2 changed files
with
9 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,30 +52,13 @@ | |
|
||
#### Gradle | ||
|
||
NOTE: Apple targets are not yet available through JitPack, so for now the library is published on GitHub packages which requires login credentials also for reading. | ||
|
||
Setup GitHub credentials: | ||
1. Open ~/.gradle/gradle.properties | ||
2. Add the line `mavenUsername=yourGithubUsername` | ||
3. Add the line `mavenPassword=yourGithubToken` (instructions to generate it https://docs.github.com/en/[email protected]/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) | ||
|
||
Alternatively it is possible to follow these steps to build the library locally: | ||
1. Clone the repository. | ||
2. Run the gradle task `publishToMavenLocal`. | ||
3. Replace the GitHub `maven` block with `mavenLocal()` in the `repositories` block in your `build.gradle.kts` file. | ||
4. Continue with the following guide. | ||
|
||
If you are getting an error saying that OpenSSL hasn't been found, please copy the correct file from https://github.com/davidepianca98/KMQTT/tree/master/kmqtt-common/src/nativeInterop in your project's main directory. | ||
|
||
##### Kotlin Multiplatform plugin | ||
On the Kotlin Multiplatform plugin you only need to require the dependency on the common source set and the platform specific parts will be automatically imported. | ||
```gradle | ||
repositories { | ||
mavenCentral() | ||
maven { | ||
url = uri("https://maven.pkg.github.com/davidepianca98/KMQTT") | ||
credentials(PasswordCredentials::class) | ||
} | ||
} | ||
kotlin { | ||
|
@@ -86,35 +69,27 @@ kotlin { | |
sourceSets { | ||
commonMain { | ||
dependencies { | ||
implementation("com.github.davidepianca98:kmqtt-common:0.4.3") | ||
implementation("com.github.davidepianca98:kmqtt-client:0.4.3") | ||
implementation("io.github.davidepianca98:kmqtt-common:0.4.3") | ||
implementation("io.github.davidepianca98:kmqtt-client:0.4.3") | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
NOTE: If you want to use Jitpack, replace "com.github.davidepianca98" with "com.github.davidepianca98.KMQTT" in the `implementation` statements. | ||
|
||
##### Single platform project | ||
```gradle | ||
repositories { | ||
mavenCentral() | ||
maven { | ||
url = uri("https://maven.pkg.github.com/davidepianca98/KMQTT") | ||
credentials(PasswordCredentials::class) | ||
} | ||
} | ||
dependencies { | ||
implementation("com.github.davidepianca98:kmqtt-common-jvm:0.4.3") | ||
implementation("com.github.davidepianca98:kmqtt-client-jvm:0.4.3") | ||
implementation("io.github.davidepianca98:kmqtt-common-jvm:0.4.3") | ||
implementation("io.github.davidepianca98:kmqtt-client-jvm:0.4.3") | ||
} | ||
``` | ||
|
||
Replace jvm with js, linuxx64, linuxarm64, mingwx64, macosx64, macosarm64, iosarm64, iosX64, iossimulatorarm64, tvossimulatorarm64, tvosx64, tvosarm64, watchosarm32, watchosarm64, watchosx64, watchossimulatorarm64 based on the desired target. | ||
|
||
NOTE: If you want to use Jitpack, replace "com.github.davidepianca98" with "com.github.davidepianca98.KMQTT" in the `implementation` statements. | ||
|
||
#### Quick start code example | ||
This code starts the MQTT client on port 1883 without TLS encryption. You can play with MQTTClient() constructor parameters to set the various settings | ||
```kotlin | ||
|
@@ -175,30 +150,13 @@ You can download the executables for your platform under the release tab | |
|
||
#### Gradle | ||
|
||
NOTE: Apple targets are not yet available through JitPack, so for now the library is published on GitHub packages which requires login credentials also for reading. | ||
|
||
Setup GitHub credentials: | ||
1. Open ~/.gradle/gradle.properties | ||
2. Add the line `mavenUsername=yourGithubUsername` | ||
3. Add the line `mavenPassword=yourGithubToken` (instructions to generate it https://docs.github.com/en/[email protected]/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) | ||
|
||
Alternatively it is possible to follow these steps to build the library locally: | ||
1. Clone the repository. | ||
2. Run the gradle task `publishToMavenLocal`. | ||
3. Replace the GitHub `maven` block with `mavenLocal()` in the `repositories` block in your `build.gradle.kts` file. | ||
4. Continue with the following guide. | ||
|
||
If you are getting an error saying that OpenSSL hasn't been found, please copy the correct file from https://github.com/davidepianca98/KMQTT/tree/master/kmqtt-common/src/nativeInterop in your project's main directory. | ||
|
||
##### Kotlin Multiplatform plugin | ||
On the Kotlin Multiplatform plugin you only need to require the dependency on the common source set and the platform specific parts will be automatically imported. | ||
```gradle | ||
repositories { | ||
mavenCentral() | ||
maven { | ||
url = uri("https://maven.pkg.github.com/davidepianca98/KMQTT") | ||
credentials(PasswordCredentials::class) | ||
} | ||
} | ||
kotlin { | ||
|
@@ -208,35 +166,27 @@ kotlin { | |
sourceSets { | ||
commonMain { | ||
dependencies { | ||
implementation("com.github.davidepianca98:kmqtt-common:0.4.3") | ||
implementation("com.github.davidepianca98:kmqtt-broker:0.4.3") | ||
implementation("io.github.davidepianca98:kmqtt-common:0.4.3") | ||
implementation("io.github.davidepianca98:kmqtt-broker:0.4.3") | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
NOTE: If you want to use Jitpack, replace "com.github.davidepianca98" with "com.github.davidepianca98.KMQTT" in the `implementation` statements. | ||
|
||
##### Single platform project | ||
```gradle | ||
repositories { | ||
mavenCentral() | ||
maven { | ||
url = uri("https://maven.pkg.github.com/davidepianca98/KMQTT") | ||
credentials(PasswordCredentials::class) | ||
} | ||
} | ||
dependencies { | ||
implementation("com.github.davidepianca98:kmqtt-common-jvm:0.4.3") | ||
implementation("com.github.davidepianca98:kmqtt-broker-jvm:0.4.3") | ||
implementation("io.github.davidepianca98:kmqtt-common-jvm:0.4.3") | ||
implementation("io.github.davidepianca98:kmqtt-broker-jvm:0.4.3") | ||
} | ||
``` | ||
|
||
Replace jvm with js, linuxx64, linuxarm64, macosarm64, macosx64, mingwx64 based on the desired target. | ||
|
||
NOTE: If you want to use Jitpack, replace "com.github.davidepianca98" with "com.github.davidepianca98.KMQTT" in the `implementation` statements. | ||
|
||
#### Quick start code example | ||
This code starts the MQTT broker on port 1883 without TLS encryption. You can play with Broker() constructor parameters to set the various settings | ||
```kotlin | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters