From: Alexander Goussas Date: Mon, 29 Dec 2025 15:12:39 +0000 (-0500) Subject: configure publish plugin and add usage instructions to readme X-Git-Url: http://git.frustrated-labs.net/?a=commitdiff_plain;h=5cbb2cf3454e37df95cc24f5de69f5668b8a9158;p=gradle-configvalidator-plugin.git configure publish plugin and add usage instructions to readme --- diff --git a/README.md b/README.md index a878a8e..7d791b2 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,31 @@ A Java library that you can include in your IDE or tooling plugins to validate your configuration variables. -A first party CLI tool that uses this library is also provided as a native executable with -GraalVM. - ## Usage -TODO +The library is highly configurable to: + +- **Pull configuration variables** from different sources +- **Parse rules** in different formats +- **Output results** in different ways + +You can configure the `RuleEngine` at the time of instantiation with each: + +```java +final var engine = new RuleEngine(reporter, parser, dataSource); +``` + +To see the available reporters, parsers and dataSources, consult the wiki. + +Another option is to implement these interfaces yourself. The names of the +interfaces are: + +- `ConfigurationVariableSource` to fetch configuration variables +- `ResultsReporter` to report validation results +- `RuleParser` to parse rules + +You can consult the corresponding source code and Java doc for guidance on +how to implement these. ## Architecture diff --git a/gradle.properties b/gradle.properties index 377538c..a3e55ae 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,4 @@ -# This file was generated by the Gradle 'init' task. -# https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties - org.gradle.configuration-cache=true +mavenCentralPublishing=true +signAllPublications=true diff --git a/lib/build.gradle.kts b/lib/build.gradle.kts index dc0bd47..046cbfe 100644 --- a/lib/build.gradle.kts +++ b/lib/build.gradle.kts @@ -1,12 +1,6 @@ -/* - * This file was generated by the Gradle 'init' task. - * - * This generated file contains a sample Java library project to get you started. - * For more details on building Java & JVM projects, please refer to https://docs.gradle.org/8.14.2/userguide/building_java_projects.html in the Gradle documentation. - */ - plugins { `java-library` + id("com.vanniktech.maven.publish") version "0.35.0" } repositories { @@ -31,3 +25,33 @@ java { tasks.named("test") { useJUnitPlatform() } + + +mavenPublishing { + coordinates("io.github.aloussase", "configvalidator", "0.1.0") + pom { + name.set("Config Validator") + description.set("Rule engine to validate configuration coming from different sources.") + inceptionYear.set("2025") + url.set("https://github.com/aloussase/configvalidator/") + licenses { + license { + name.set("The MIT License") + url.set("https://opensource.org/license/mit") + distribution.set("https://opensource.org/license/mit") + } + } + developers { + developer { + id.set("aloussase") + name.set("Alexander Goussas") + url.set("https://github.com/aloussase/") + } + } + scm { + url.set("https://github.com/aloussase/configvalidator/") + connection.set("scm:git:git://github.com/aloussase/configvalidator.git") + developerConnection.set("scm:git:ssh://git@github.com/aloussase/configvalidator.git") + } + } +} \ No newline at end of file