Skip to content

Commit

Permalink
Merge pull request #141 from kontent-ai/migration
Browse files Browse the repository at this point in the history
Migrate to new organization
  • Loading branch information
Simply007 committed Oct 24, 2022
2 parents 456623e + 668a13f commit e20c4d7
Show file tree
Hide file tree
Showing 270 changed files with 3,569 additions and 2,801 deletions.
20 changes: 11 additions & 9 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion kontent-delivery/CHANGES.md → CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
# Changes in v4 -> v5

* Thymeleaf default template location changed
* `kontent/ai/templates/`, `META-INF/kontent/ai/templates/` - you need to move your templates, use custom path configuration
* Namespaces of the packages we changed from `kentico.kontent.delivery.*` to `kontent.ai.delivery.*`
* Prefix for Kontent.ai exceptions has been changed from `Kentico` to `Kontent`:
* `KontentError`, `KontentErrorException`, `KontentException`, `KontentIOException`, and `KontentRetryException`
* Android Sample apps changed the application id prefix to "kontent.ai.*"
* Packages are signed by the new PGP key with id `A5992A24`

# Changes in v3 -> v4

* Delivery client now returns `CompletionStage` and it is async by default
* Internally [OkHttpClient](https://square.github.io/okhttp/4.x/okhttp/okhttp3/-ok-http-client/) is used to handle network requests
* Place for templates is by default
* `kentico/templates/`, `META-INF/kentico/templates/`, `kentico/kontent/templates/`, `META-INF/kentico/kontent/templates/` (last two are new)
* Retry codes are now set statically in DeliveryClient: `408, 429, 500, 502, 503, 504`
* If the retry response is not parsable to KenticoError.class - retry is not performed - https://docs.kontent.ai/reference/delivery-api#section/Errors/Resolving-errors
* If the retry response is not parsable to KenticoError.class - retry is not performed - https://kontent.ai/learn/reference/delivery-api#section/Errors/Resolving-errors
* Accessing linked items element data was simplified
* from

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Kentico
Copyright (c) 2022 Kontent s.r.o.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
71 changes: 45 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
# Kontent Java Packages
# Kontent.ai Java Packages

[![GitHub Discussions](https://img.shields.io/badge/GitHub-Discussions-FE7A16.svg?style=popout&logo=github)](https://github.com/Kentico/Home/discussions)
[![Stack Overflow](https://img.shields.io/badge/Stack%20Overflow-ASK%20NOW-FE7A16.svg?logo=stackoverflow&logoColor=white)](https://stackoverflow.com/tags/kentico-kontent)
[![Discord](https://img.shields.io/discord/821885171984891914?label=Discord&logo=Discord&logoColor=white)](https://discord.gg/SKCxwPtevJ)
[![Stack Overflow](https://img.shields.io/badge/Stack%20Overflow-ASK%20NOW-FE7A16.svg?logo=stackoverflow&logoColor=white)](https://stackoverflow.com/tags/kontent-ai)
[![Discord](https://img.shields.io/discord/821885171984891914?color=%237289DA&label=Kontent.ai%20Discord&logo=discord)](https://discord.gg/SKCxwPtevJ)

Monorepo with Java Kontent packages.
Monorepo with Java Kontent.ai packages.

## Packages

| Package | Summary | Version |
| :----------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| [Kontent Delivery Java SDK](/kontent-delivery#readme) | The Kontent Delivery Java SDK is a client library used for retrieving content from [Kontent by Kentico](https://kontent.ai) | [![Download](https://api.bintray.com/packages/kentico/kontent-java-packages/kontent-delivery/images/download.svg)](https://bintray.com/kentico/kontent-java-packages/kontent-delivery/_latestVersion) |
| [Kontent Generators](/kontent-delivery-generators#readme) | This tool generates strongly-typed models based on Content Types in a Kontent project. | [![Download](https://api.bintray.com/packages/kentico/kontent-java-packages/kontent-delivery-generators/images/download.svg)](https://bintray.com/kentico/kontent-java-packages/kontent-delivery-generators/_latestVersion) |
| [Kontent Sample Spring Boot app](/sample-app-spring-boot#readme) | Showcase of the [Spring boot](https://spring.io/projects/spring-boot) application displaying data from Kontent. | [source](/sample-app-spring-boot/README.md) |
| [Kontent Sample Gradle Console app](/test-gradle-console-app#readme) | Simple Java console application showcasing how to load data from Kontent. | [source](/test-gradle-console-app/README.md) |
| [Kontent Sample Android app (Java)](/sample-app-android#readme) | Showcase of the [Android](https://www.android.com/) application written in Java using [RxJava](https://github.com/ReactiveX/RxJava) for data fetching from Kontent. | [source](/sample-app-android/README.md) |
| [Kontent Sample Android app (Kotlin)](/sample-app-android-kotlin#readme) | Showcase of the [Android](https://www.android.com/) application written in Kotlin using [Kotlin Coroutines](https://kotlinlang.org/docs/reference/coroutines-overview.html) for data fetching from Kontent. | [source](/sample-app-android-kotlin/README.md) |
| Package | Summary | Version |
| :-------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| [Kontent.ai Delivery Java SDK](/delivery-sdk#readme) | The Kontent.ai Delivery Java SDK is a client library used for retrieving content from [Kontent.ai](https://kontent.ai) | [![Maven Central](https://img.shields.io/maven-central/v/ai.kontent/delivery-sdk)](https://s01.oss.sonatype.org/content/groups/public/ai/kontent/delivery-sdk/) |
| [Kontent.ai Generators](/delivery-sdk-generators#readme) | This tool generates strongly-typed models based on Content Types in a Kontent.ai project. | [![Maven Central](https://img.shields.io/maven-central/v/ai.kontent/delivery-sdk-generators)](https://s01.oss.sonatype.org/content/groups/public/ai/kontent/delivery-sdk-generators) |
| [Kontent.ai Sample Spring Boot app](/sample-app-spring-boot#readme) | Showcase of the [Spring boot](https://spring.io/projects/spring-boot) application displaying data from Kontent.ai. | [source](/sample-app-spring-boot/README.md) |
| [Kontent.ai Sample Gradle Console app](/test-gradle-console-app#readme) | Simple Java console application showcasing how to load data from Kontent.ai. | [source](/test-gradle-console-app/README.md) |
| [Kontent.ai Sample Android app (Java)](/sample-app-android#readme) | Showcase of the [Android](https://www.android.com/) application written in Java using [RxJava](https://github.com/ReactiveX/RxJava) for data fetching from Kontent.ai. | [source](/sample-app-android/README.md) |
| [Kontent.ai Sample Android app (Kotlin)](/sample-app-android-kotlin#readme) | Showcase of the [Android](https://www.android.com/) application written in Kotlin using [Kotlin Coroutines](https://kotlinlang.org/docs/reference/coroutines-overview.html) for data fetching from Kontent.ai. | [source](/sample-app-android-kotlin/README.md) |

## Development

Expand All @@ -24,47 +23,67 @@ If you wish to find out more about the project specification. Check out the [Pro
### Prerequisites

**Required:**
Java 8 SDK (Oracle & OpenJDK both tested and supported)

- Java 8 SDK (Oracle & OpenJDK both tested and supported)
- [Android SDK](https://developer.android.com/studio#downloads) for the sample application (minimal version 28) - command line tools would be sufficient


### Build and Test

- Ensure your `JAVA_HOME` environment is set.
- Clone this repository

```sh
git clone https://github.com/Kentico/kontent-java-packages
git clone https://github.com/kontent-ai/java-packages
```

- Enter the cloned repository

```sh
cd kontent-java-packages
```

- Enter the cloned repository and build the project via the provided Gradle wrapper.
- Copy `local.properties.template` file in this directory to `local.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 use `chmod a+x ./gradlew` which allows execution to everybody.
```sh
cd kontent-java-packages
./gradlew clean build
```

> The command will build whole solution and run all tests in this monorepo.
#### :bulb: Next steps

The ideal next step is to test out the [Kontent Sample Spring Boot app](/sample-app-spring-boot#readme) or load the project in In IDE ([IntelliJ IDEA](https://www.jetbrains.com/idea/) recommended) and run/debug tests in [Kontent Delivery Java SDK](/kontent-delivery#readme).
The ideal next step is to test out the [Kontent.ai Sample Spring Boot app](/sample-app-spring-boot#readme) or load the
project in In IDE ([IntelliJ IDEA](https://www.jetbrains.com/idea/) recommended) and run/debug tests
in [Kontent.ai Delivery Java SDK](/delivery-sdk#readme).

## Publishing

> 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](https://oss.sonatype.org/).
> 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](https://s01.oss.sonatype.org/).
1. Verify that everything in the branch is ready to be published and the [build and tests](https://github.com/Kentico/kontent-java-packages/actions/workflows/gradle.yml) are passing.
1. Verify that everything in the branch is ready to be published and
the [build and tests](https://github.com/kontent-ai/java-packages/actions/workflows/gradle.yml) are passing.
1. 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. `4.4.0-SNAPSHOT` artifact will be published to the `https://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](https://github.com/Kentico/kontent-java-packages/actions/workflows/publish.yml) and creates and publishes the artifacts to "Staging" repositories on Nexus repository manager.
- If you define tag name with "-SNAPSHOT" suffix i.e. `5.0.0-SNAPSHOT` artifact will be published to
the `https://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](https://github.com/kontent-ai/java-packages/actions/workflows/publish.yml) and
creates and publishes the artifacts to "Staging" repositories on Nexus repository manager.

1. Log in to the [Nexus Repository Manager](https://oss.sonatype.org/).
1. 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*).
1. Log in to the [Nexus Repository Manager](https://s01.oss.sonatype.org/).
1. 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_).
1. Close the Staging repository
1. Release the Closed repository
1. 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"](https://github.com/Kentico/kontent-java-packages/wiki/Release-process).
> 💡 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"](./docs/Release-process.md).
Loading

0 comments on commit e20c4d7

Please sign in to comment.