Monorepo with Java Kontent.ai packages.
Package | Summary | Version |
---|---|---|
Kontent.ai Delivery Java SDK | The Kontent.ai Delivery Java SDK is a client library used for retrieving content from Kontent.ai | |
Kontent.ai Generators | This tool generates strongly-typed models based on Content Types in a Kontent.ai project. | |
Kontent.ai Sample Spring Boot app | Showcase of the Spring boot application displaying data from Kontent.ai. | source |
Kontent.ai Sample Gradle Console app | Simple Java console application showcasing how to load data from Kontent.ai. | source |
Kontent.ai Sample Android app (Java) | Showcase of the Android application written in Java using RxJava for data fetching from Kontent.ai. | source |
Kontent.ai Sample Android app (Kotlin) | Showcase of the Android application written in Kotlin using Kotlin Coroutines for data fetching from Kontent.ai. | source |
Kontent.ai Java packages docs | Documentation for Kontent.ai Java packages | source |
If you wish to find out more about the project specification. Check out the Project information.
Required:
- Java 8 SDK (Oracle & OpenJDK both tested and supported)
- Android SDK for the sample application (minimal version 28) - command line tools would be sufficient
-
Ensure your
JAVA_HOME
environment is set. -
Clone this repository
git clone https://github.com/kontent-ai/java-packages
-
Enter the cloned repository
cd kontent-java-packages
-
Copy
local.properties.template
file in this directory tolocal.properties
(which will be ignored by Git) -
Set the
sdk.dir
variable Android SDK location -
Build the project via the provided Gradle wrapper.
To grant execution rights for
gradlew
binary, you could usechmod a+x ./gradlew
which allows execution to everybody../gradlew clean build
The command will build whole solution and run all tests in this monorepo.
Due to security reasons the verifications of dependencies checksums is enabled in this repository. When you update the dependency on some libray you might need to update gradle/verification-metadata.xml
.
To let gradle obtain checksum and rewrite them to gradle/verification-metadata.xml` you can use command:
gradle --write-verification-metadata sha256 help
However, we recommend to use the command with switch option --dry-run
to create a copy of the file and check the results before:
gradle --write-verification-metadata sha256 help --dry-run
The ideal next step is to test out the Kontent.ai Sample Spring Boot app or load the project in In IDE (IntelliJ IDEA recommended) and run/debug tests in Kontent.ai Delivery Java SDK.
To publish a new version, it is required to have write permissions for this repository (to be able to create releases) and access to the Nexus Repository Manager.
-
Verify that everything in the branch is ready to be published and the build and tests are passing.
-
Create new GitHub release - the tag name of the release will be used as a version
-
If you define tag name with "-SNAPSHOT" suffix i.e.
5.0.0-SNAPSHOT
artifact will be published to thehttps://s01.oss.sonatype.org/content/repositories/snapshots/
, so that you could use it when you want to try out the beta version. -
The creation of a release triggers the Publish Github workflow and creates and publishes the artifacts to "Staging" repositories on Nexus repository manager.
-
-
Log in to the Nexus Repository Manager.
-
Select "Staging repositories", verify the repository content (sometimes it takes a couple of minutes until the repository is visible in the Nexus Repository Manager UI).
-
Close the Staging repository
-
Release the Closed repository
-
Increase the patch version and append
-SNAPSHOT
in the bottom of/build.gradle
file (i.e.4.4.1-SNAPSHOT
).
💡 This is just an abbreviated description of the publishing process. If you want to see the detailed publishing description, checkout the wiki page "Publishing process".