Skip to content

Define lphy extension conventions and share the build logic

License

Notifications You must be signed in to change notification settings

LinguaPhylo/GradlePlugins

Repository files navigation

Gradle Plugins

Define lphy extension conventions and share the build logic.

The released versions are available in the Maven Central Repository: https://search.maven.org/artifact/io.github.linguaphylo/platforms.

1) lphy-java

Use Java 17 and overwrite java related tasks to use module-path.

Usage

plugins {
    id("io.github.linguaphylo.lphy-java") version "0.1.2"
}

Features

  1. Constrain to Java 17 or higher, and overwrite java related tasks to use module-path.
  2. Configure compileJava task to use module-path to compile classes;
  3. Configure javadoc task to use html5 which solves the issue using >= Java 9, and also turn off warnings.

2) lphy-publish

Configure the repositories for maven publishing and proceed signing.

Usage

plugins {
    id("io.github.linguaphylo.lphy-publish") version "0.1.2"
}

Features

  1. Configure publishing repositories;

If there are OSSRH properties provided, then publish to the Maven releases repository if version does not end with "SNAPSHOT", otherwise publish to the Maven snapshots repository. If no OSSRH properties, then publish to the local folder "releases" under the build directory.

  1. Signing the publications defined in the project, if there are signing properties provided.

Command line

Then, use the following command to publish, where -P defines the Gradle properties, and where the backslash is used to break lines :

./gradlew clean
./gradlew publish \
    -Psigning.secretKeyRingFile=/path/to/mysecr.gpg \
    -Psigning.password=mypswd -Psigning.keyId=last8chars \
    -Possrh.user=myuser -Possrh.pswd=mypswd

The first three properties for signing by GPG. The last two are used to login your JIRA account in Sonatype.

See also lphy developer's note.

How to develop Gradle plugins

About

Define lphy extension conventions and share the build logic

Resources

License

Stars

Watchers

Forks

Packages

No packages published