Skip to content

Commit

Permalink
v5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
robstoll committed Nov 1, 2023
1 parent 823cd43 commit 73bbd64
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 23 deletions.
29 changes: 11 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Gradle Plugin Portal](https://img.shields.io/badge/gradle%20plugin-v4.11.0-blue.svg)](https://plugins.gradle.org/u/robstoll)
[![Gradle Plugin Portal](https://img.shields.io/badge/gradle%20plugin-v5.0.0-blue.svg)](https://plugins.gradle.org/u/robstoll)
[![Apache license](https://img.shields.io/badge/license-Apache%202.0-brightgreen.svg)](http://opensource.org/licenses/Apache2.0)
[![Build Status Ubuntu](https://github.com/robstoll/tutteli-gradle-plugins/workflows/Ubuntu/badge.svg?event=push)](https://github.com/robstoll/tutteli-gradle-plugins/actions?query=workflow%3AUbuntu+branch%3Amain)
[![Build Status Windows](https://github.com/robstoll/tutteli-gradle-plugins/workflows/Windows/badge.svg?event=push)](https://github.com/robstoll/tutteli-gradle-plugins/actions?query=workflow%3AWindows+branch%3Amain)
Expand All @@ -18,65 +18,58 @@ if you find a bug or need some help.

The following sections give brief information what the different plugins offer.

# ch.tutteli.gradle.plugins.dokka [🔗](https://plugins.gradle.org/plugin/ch.tutteli.dokka/4.11.0)
# ch.tutteli.gradle.plugins.dokka [🔗](https://plugins.gradle.org/plugin/ch.tutteli.dokka/5.0.0)

Applies the [dokka-plugin](https://github.com/Kotlin/dokka) and defines a `sourceLink` per `dokkaSourceSet`.
If the project version follows the pattern x.y.z, then an `externalDocumentationLink` per `dokkaSourceSet` is defined in addition.
The url used for the `sourceLink` and the `externalDocumentationLink` is based on a given githubUser.
Last but not least, it automatically configures dokka to look in test folder for *Samples.kt files for samples linked
in KDoc.

# ch.tutteli.gradle.plugins.junitjacoco [🔗](https://plugins.gradle.org/plugin/ch.tutteli.junitjacoco/4.11.0)
# ch.tutteli.gradle.plugins.junitjacoco [🔗](https://plugins.gradle.org/plugin/ch.tutteli.junitjacoco/5.0.0)
Applies the [junit-platform-gradle-plugin](https://junit.org/junit5/docs/current/user-guide/#running-tests-build-gradle)
as well as the [jacoco-plugin](https://docs.gradle.org/current/userguide/jacoco_plugin.html)
and applies some default configuration.

This plugin does not set up a junit engine and you need to define it yourself.
Have a look at [build.gradle](https://github.com/robstoll/tutteli-gradle-plugins/tree/v4.11.0/build.gradle#L61)
Have a look at [build.gradle](https://github.com/robstoll/tutteli-gradle-plugins/tree/v5.0.0/build.gradle#L61)
for an example.

# ch.tutteli.gradle.plugins.kotlin.module.info [🔗](https://plugins.gradle.org/plugin/ch.tutteli.gradle.plugins.kotlin.module.info/4.11.0)
# ch.tutteli.gradle.plugins.kotlin.module.info [🔗](https://plugins.gradle.org/plugin/ch.tutteli.gradle.plugins.kotlin.module.info/5.0.0)

Intended to be used in a kotlin project where either module-info.java is the single java source file or where >= jdk 11 is used.
It sets up compileJava accordingly and configures JavaCompile tasks to use jdk 11 for `sourceCompatibility`/`targetCompatibility` if not already set or higher.

Per default, it reads the module name (which is used for `--patch-module`) from the defined module-info.java.
You can speed up this process (in case you have many java files) by defining `moduleName` on `project.extra`.

# ch.tutteli.gradle.plugins.publish [🔗](https://plugins.gradle.org/plugin/ch.tutteli.gradle.plugins.publish/4.11.0)
# ch.tutteli.gradle.plugins.publish [🔗](https://plugins.gradle.org/plugin/ch.tutteli.gradle.plugins.publish/5.0.0)

Applies the `maven-publish` and `signing` plugin and
configures them based on given license(s), a github user and a few other information.
It exposes the `tutteliPublish` extension which lets you specify those information and refine default conventions.
Have a look at the [example in the tests](https://github.com/robstoll/tutteli-gradle-plugins/tree/main/tutteli-gradle-publish/src/test/groovy/ch/tutteli/gradle/publish/PublishPluginIntTest.groovy#L41)
Have a look at the [example in the tests](https://github.com/robstoll/tutteli-gradle-plugins/tree/v5.0.0/tutteli-gradle-publish/src/test/groovy/ch/tutteli/gradle/publish/PublishPluginIntTest.groovy#L41)
for more information.

If not set, it automatically propagates `version` and `group` from `rootProject` to subprojects
(`group` of subprojects are set to "" when plugin is applied, would default to `rootProject.name`).

If no MavenPublication is defined, then it creates one which:
- automatically uses `project.components.java` if available.
- includes all Jar Tasks into the publication
- includes all Jar Tasks into the publication (you can use an `artifactFilter` to exclude some)

Regardless if there was one or several existing MavenPublications or one was created by the plugin.
All Jar Tasks are modified in a way that they include the LICENSE(.txt) file located in the root of the rootProject
and augments the manifest file with information such as Build-Time, Kotlin-version used etc.
and augments the manifest file with information such as Vendor, Kotlin-version used etc.

Last but not least, it augments the pom-file with license, developer and scm information (can be configured via the `tutteliPublish` extension)

The conventions:
- Apache 2.0 is used as default license
- project.group, project.description and project.version is used in publishing
- gpg passphrase/keyRing and keyId can either be provided by a property (if you do, gradle.properties make sense) or by System.env with the following names:
- configures `singing` to `useGpgCmd`

| prop | env |
|-----------------|--------------------|
| gpgPassphrase | GPG_PASSPHRASE |
| gpgKeyRing | GPG_KEY_RING |
| gpgKeyId | GPG_KEY_ID |
- The private gpg key can also be provided via GPG_SIGNING_KEY instead of pointing to a file via gpgKeyRing and specifying a gpgKeyId

# ch.tutteli.gradle.plugins.spek [🔗](https://plugins.gradle.org/plugin/ch.tutteli.spek/4.11.0)
# ch.tutteli.gradle.plugins.spek [🔗](https://plugins.gradle.org/plugin/ch.tutteli.spek/5.0.0)
-> will most likely be removed with 6.0.0 (spek is no longer a reliable test runner IMO regarding maintenance)

Applies the junitjacoco plugin (which itself applies the junit and jacoco plugin, see two sections above)
Expand Down
9 changes: 4 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
val version = "4.11.0-SNAPSHOT"
val version = "5.0.0"
val previousVersion = "4.11.0"

rootProject.version = version
Expand Down Expand Up @@ -43,8 +43,7 @@ configure(pluginProjects) {
Release & deploy
----------------
(assumes you have an alias named gr pointing to ./gradlew)
1. gr removeRepo
2. Update master:
1. Update master:
a) point to the tag
1) update version of the badges in README (except for codecov)
2) search for `tree/master` in README and replace it with `tree/vX.Y.Z`
Expand All @@ -53,9 +52,9 @@ Release & deploy
c) commit & push (modified README.md and build.gradle.kts)
d) git tag vX.Y.Z
e) git push origin vX.Y.Z
3. publish plugins
2. publish plugins
a) gr publishPlugins
4. create release on github
3. create release on github
Prepare next dev cycle
Expand Down

0 comments on commit 73bbd64

Please sign in to comment.