Skip to content

Commit

Permalink
Released KTX 1.9.10-b5. #257
Browse files Browse the repository at this point in the history
  • Loading branch information
czyzby committed Apr 10, 2020
2 parents 701249f + 8bbaf5d commit 04543b5
Show file tree
Hide file tree
Showing 87 changed files with 9,361 additions and 484 deletions.
162 changes: 96 additions & 66 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,24 @@

## Issues

- Before submitting a bug-related issue, make sure that **its source is not the LibGDX itself**.
- Issues are among the fastest way to contact the developers. It is fine to create issues with feature requests and
questions about the library.
- Before submitting a bug-related issue, make sure that its source is not the LibGDX itself.
- Feel free to create issues with feature requests and questions about the libraries. Issues are among the fastest way
to contact the developers.

## Pull requests

- The latest changes are always in the `develop` branch. `master` branch always matches the latest stable release. Make
sure to checkout `develop` branch before starting your work and set `develop` as the target branch before creating
a pull request.
- Include issue or pull request IDs in related commit messages. This makes it easier to locate more information about
the changes. For example:

> Kotlin version update. #250
- Use IntelliJ Kotlin [code formatter](../intellij-formatter.xml) included in the root directory.
- Make sure to include unit tests of your code. Test names should use the `` `backtick method name` `` syntax.
JUnit and [Spek](http://spekframework.org/) can be used to write tests. Use
[Mockito-Kotlin](https://github.com/nhaarman/mockito-kotlin) for mocking.
JUnit and [Spek](http://spekframework.org/) can be used to write tests, although JUnit is encouraged for its commonness.
Use [Mockito-Kotlin](https://github.com/nhaarman/mockito-kotlin) for mocking.
- If your pull request is not a simple bug fix or small utility, make sure to link it to an existing issue or create
an issue with your proposal first. Major API changes or new modules have to be discussed with the maintainers first.
Skipping the issue will not get your pull request rejected outright, but note that undiscussed major changes might
Expand All @@ -25,10 +30,10 @@ require a rewrite.
- **[UPDATE]** - an update of one of the major dependencies.
- **[FIX]** - a bug fix.
- **[MISC]** - other changes (e.g. related to documentation or the project itself).
- Some libraries (like `ktx-collections` or `ktx-math`) list _all_ features in the `README.md` files to ease their
usage. When adding a new feature, please check the `README.md` file of the module and add description of your change
when appropriate. Any major change should include a usage example in the module guide. Also, make sure to add all
of the necessary imports in KTX examples in `README.md` files to make it easier to try them out.
- Most libraries list _all_ features in the `README.md` files to ease their usage. When adding a new feature,
please check the `README.md` file of the module and add description of your change when appropriate. Any major feature
should include a usage example in the module guide. Make sure to add all of the necessary imports in the usage examples
in `README.md` files to make it easier to try them out.

## Working from sources

Expand All @@ -38,12 +43,15 @@ cd ktx
git checkout develop
```

### Build tool
### Gradle

The project itself is managed by [Gradle](http://gradle.org/). Gradle wrapper is included, but you can use a local
Gradle installation - scripts should be compatible with Gradle `5.+`. Some useful Gradle tasks include:
Gradle installation - scripts should be compatible with Gradle `5.+`. Gradle projects are handled out of the box by
IntelliJ, so KTX should be relatively easy to import.

- `build install` - builds the libraries archives and pushes them to _Maven Local_.
Some useful Gradle tasks include:

- `build install` - builds the libraries archives and pushes them to _Maven Local_. Useful for local tests.
- `check` - runs all tests in all projects.
- `clean` - removes the `build` directories, which forces rebuilds of the modules.
- `distZip` - prepares a zip archive with all jars in `build/distributions` folder. Useful for releases.
Expand All @@ -53,61 +61,16 @@ and _Sonatype_ logging data.
case of a non-snapshot upload to _Maven Central_. Might fail at times on the promotion task; running `promoteRepository`
separately usually fixes the issue.

### Versioning and uploading

#### Stable release

- Create a new issue on GitHub. Include the number of the issue in commit messages of all commits related to the release.
Apply `misc` label and milestone corresponding to the LibGDX version. An example can be found
[here](https://github.com/libktx/ktx/issues/191).
- Change `libVersion` setting in the [`version.txt`](../version.txt). KTX uses the same versioning schema as LibGDX
(mimicking the LibGDX version that it was compiled against) with optional `-b#` suffix depending on the version status.
- Create a pull request from the `develop` branch to the `master` branch. Review and merge the changes to the `master`
branch.
- Checkout the `master` branch. Fetch the latest changes.
- Run `gradle build install uploadArchives closeAndPromoteRepository` to push artifacts to both _Maven Local_ and
_Maven Central_. Note that the Maven plugin has its issues and you might need to run `gradle promoteRepository` after
the previous task sequence (if it fails on the `closeAndPromoteRepository` task).
- Run `gradle distZip` to prepare an archive with KTX sources, compiled binary and documentation.
- Upload the archive to [releases](https://github.com/libktx/ktx/releases) section. The tag should be made from the
`master` branch and its name should match the released version. Name of the release should match `KTX $libVersion`.
Add a short release summary and copy the latest [changelog](../CHANGELOG.md) entries to the release description.
- If there are any known issues with the previous or current versions, please attach additional _Known issues:_ section
with the following labels:
- **[BUG]** - a known bug in the release that is or will be fixed in the following versions.
- **[INCOMPATIBILITY]** - incompatibility with one of the previously supported or currently released versions of one
of the major dependencies.
- **[REMOVAL]** - temporary or permanent removal of a major feature (e.g. disabling a module for a single release).
- Checkout the `develop` branch.
- Change `libVersion` setting in the [`version.txt`](../version.txt) to the next snapshot release. The name should
match the used LibGDX version followed by the `-SNAPSHOT` suffix.
Note that since [Dokka](https://github.com/Kotlin/dokka) is used to generate documentation archives, Java 8 is required
to fully build the libraries due to a [Dokka bug](https://github.com/Kotlin/dokka/issues/294). If you prefer to develop
the library using JDK 11 or newer, you can still install JDK 8 alongside your version7 and run specific tasks with Java 8:

#### Snapshot release

- Make sure that the [`version.txt`](../version.txt) ends with the `-SNAPSHOT` suffix and matches the LibGDX version
that the library was compiled against.
- Run `gradle build install uploadArchives` to push artifacts to both _Maven Local_ and _Sonatype_ snapshots repository.

### Updating dependencies

Dependencies versions are stored in the [gradle.properties](../gradle.properties) file. Snapshot releases should keep
all of the dependencies (outside of testing scope) up-to-date. Major dependencies updating:

- **LibGDX**: update `gdxVersion` in the properties file and LibGDX version in the tag on the top of the
[README.md](../README.md) file. Note that updating LibGDX also affects the KTX version, so make sure to update
[version.txt](../version.txt) as well.
- **Kotlin**: update the `kotlinVersion` property and the Kotlin tag in the [README.md](../README.md).
- **Kotlin Coroutines**: update `kotlinCoroutinesVersion` property and the tag in the
`ktx-async` [README.md](../async/README.md).
- **Gradle**: run `gradle wrapper` in the root project folder. Make sure that the
[Gradle wrapper properties file](../gradle/wrapper/gradle-wrapper.properties) points the `all` Gradle release under
`distributionUrl` rather than just the binaries (`bin`).
- **VisUI**: update `visUiVersion` in the properties file and VisUI version in the tag on the top of the
[vis/README.md](../vis/README.md) file.
- **Ashley**: update `ashleyVersion` in the properties file and Ashely version in the tag on the top of the
[ashley/README.md](../ashley/README.md) file.

All of the major dependencies updates should be added to the [changelog](../CHANGELOG.md).
```bash
./gradlew clean test jar
# Pass the correct path to JDK 8:
./gradlew -Dorg.gradle.java.home=/usr/lib/jvm/java-1.8.0-openjdk-amd64 dokkaJavadoc
./gradlew uploadArchives
```

### Adding a new KTX module

Expand Down Expand Up @@ -135,6 +98,12 @@ should generally consist of the following sections:
- _Synergy_ - is the module complemented by any other KTX libraries?
- _Alternatives_ - are there any other libraries or modules that can be used instead?
- _Additional documentation_ - are there any other guides or articles on the topic?
- Add _Maven Central_ badge to the top of the `README.md` to ease inclusion of the library:

```markdown
[![Maven Central](https://img.shields.io/maven-central/v/io.github.libktx/ktx-your-module.svg)](https://search.maven.org/artifact/io.github.libktx/ktx-your-module)
```

- Your final module structure should roughly match this schema:

```
Expand All @@ -148,3 +117,64 @@ should generally consist of the following sections:
- gradle.properties
- README.md
```

## Maintenance

The following sections are for the maintainers of the repository.

### Updating dependencies

Dependencies versions are stored in the [gradle.properties](../gradle.properties) file. Snapshot releases should keep
all of the dependencies (outside of testing scope) up-to-date. Major dependencies updating:

- **LibGDX**: update `gdxVersion` in the properties file and LibGDX version in the tag on the top of the
[README.md](../README.md) file. Note that updating LibGDX also affects the KTX version, so make sure to update
[version.txt](../version.txt) as well.
- **Kotlin**: update the `kotlinVersion` property and the Kotlin tag in the [README.md](../README.md).
- **Kotlin Coroutines**: update `kotlinCoroutinesVersion` property and the tag in the
`ktx-async` [README.md](../async/README.md).
- **Gradle**: run `gradle wrapper` in the root project folder. Make sure that the
[Gradle wrapper properties file](../gradle/wrapper/gradle-wrapper.properties) points the `all` Gradle release under
`distributionUrl` rather than just the binaries (`bin`).
- **VisUI**: update `visUiVersion` in the properties file and VisUI version in the tag on the top of the
[vis/README.md](../vis/README.md) file.
- **Ashley**: update `ashleyVersion` in the properties file and Ashely version in the tag on the top of the
[ashley/README.md](../ashley/README.md) file.

All of the major dependencies updates should be added to the [changelog](../CHANGELOG.md).


### Versioning and uploading

#### Stable release

- Create a new issue on GitHub. Include the number of the issue in commit messages of all commits related to the release.
Apply `dev` label and milestone corresponding to the LibGDX version. An example can be found
[here](https://github.com/libktx/ktx/issues/191).
- Change `libVersion` setting in the [`version.txt`](../version.txt). KTX uses the same versioning schema as LibGDX
(mimicking the LibGDX version that it was compiled against) with a suffix depending on the version status.
- Create a pull request from the `develop` branch to the `master` branch. Review and merge the changes to the `master`
branch.
- Checkout the `master` branch. Fetch the latest changes.
- Run `gradle build install uploadArchives closeAndPromoteRepository` to push artifacts to both _Maven Local_ and
_Maven Central_. Note that the Maven plugin has its issues and you might need to run `gradle promoteRepository` after
the previous task sequence (if it fails on the `closeAndPromoteRepository` task).
- Run `gradle distZip` to prepare an archive with KTX sources, compiled binary and documentation.
- Upload the archive to [releases](https://github.com/libktx/ktx/releases) section. The tag should be made from the
`master` branch and its name should match the released version. Name of the release should match `KTX $libVersion`.
Add a short release summary and copy the latest [changelog](../CHANGELOG.md) entries to the release description.
- If there are any known issues with the previous or current versions, please attach additional _Known issues:_ section
with the following labels:
- **[BUG]** - a known bug in the release that is or will be fixed in the following versions.
- **[INCOMPATIBILITY]** - incompatibility with one of the previously supported or currently released versions of one
of the major dependencies.
- **[REMOVAL]** - temporary or permanent removal of a major feature (e.g. disabling a module for a single release).
- Checkout the `develop` branch.
- Change `libVersion` setting in the [`version.txt`](../version.txt) to the next snapshot release. The name should
match the used LibGDX version followed by the `-SNAPSHOT` suffix.

#### Snapshot release

- Make sure that the [`version.txt`](../version.txt) ends with the `-SNAPSHOT` suffix and matches the LibGDX version
that the library was compiled against.
- Run `gradle build install uploadArchives` to push artifacts to both _Maven Local_ and _Sonatype_ snapshots repository.
11 changes: 8 additions & 3 deletions .github/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Project contributors listed chronologically.
* Contributed LibGDX [collections](../collections) utilities.
* [@sreich](https://github.com/sreich)
* Contributed various utilities from the [Ore Infinium](https://github.com/sreich/ore-infinium) project.
* [@raincole](https://github.com/raincole)
* [@yhlai-code](https://github.com/yhlai-code) (_raincole_)
* Contributed LibGDX [collections](../collections) utilities.
* Provided insightful review of the [`Async`](../async) module.
* [@Jkly](https://github.com/Jkly)
Expand Down Expand Up @@ -45,6 +45,8 @@ Project contributors listed chronologically.
* Author of the [Tiled](../tiled) module.
* Contributed [actors](../actors) utilities.
* Wrote a complete [KTX tutorial](https://github.com/Quillraven/SimpleKtxGame/wiki) based on the original LibGDX introduction.
* Author of the [preferences](../preferences) module.
* Tested and reviewed the [assets async](../assets-async) module.
* [@FocusPo1nt](https://github.com/FocusPo1nt)
* Added utilities to [style module](../style).
* [@maltaisn](https://github.com/maltaisn)
Expand All @@ -54,13 +56,16 @@ Project contributors listed chronologically.
* [@kvonspiczak](https://github.com/kvonspiczak)
* Contributed documentation fix.
* [@cypherdare](https://github.com/cypherdare)
* Contributed to numerous utilities in [actors](../actors), [collections](../collections), [graphics](../graphics)
and [math](../math) modules.
* Contributed to numerous utilities in [actors](../actors), [async](../async), [collections](../collections),
[graphics](../graphics) and [math](../math) modules.
* Added `AssetGroup` API to [assets](../assets).
* [@jakewilson](https://github.com/jakewilson)
* Added utilities to [graphics module](../graphics).
* [@rhutsaliuk](https://github.com/rhutsaliuk)
* Contributed [json](../json) serializers utilities.
* [@ImXico](https://github.com/ImXico)
* Author of the [Cyberpunk](https://github.com/ImXico/Cyberpunk) framework, which is another set of Kotlin LibGDX extensions.
* Utilities for profiling, text rendering, camera updating and taking screenshots were integrated into KTX with **@ImXico** permission.

### Metrics

Expand Down
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jdk:
- openjdk11

install: ./gradlew assemble install -x dokka -x dokkaJavadoc
script: ./gradlew check
script: ./gradlew check --info --stacktrace

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
Expand All @@ -12,3 +12,5 @@ cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
env:
- TEST_PROFILE=travis
Loading

0 comments on commit 04543b5

Please sign in to comment.