zally-gradle-plugin

CircleCI Kotlin version badge Awesome Kotlin Badge APM codecov Maven Central

Runs zally linter as gradle task and export the report in different format.

Advantages

How to run locally

./gradlew clean build publishToMavenLocal

After that you are able to use/apply that plugin (even in this project) like this:

// settings.gradle.kts
pluginManagement {
    repositories {
        gradlePluginPortal()
        mavenLocal()
    }
}

// build.gradke.kts
plugins {
    id("io.github.thiyagu06") version "1.0.2-dev"
}

zallyLint {
    inputSpec = File("${projectDir}/docs/petstore-spec.yml")
    reports {
        json {
            enabled = true
            destination = File("${rootDir}/zally/violation.json")
        }
        rules {
            must {
               max = 10
            }
        }
    }
}

//execute task
./gradlew clean zallyLint

How to release

Releasing to maven central is automated via circleci. Since this is public project, I disabled few environment variables in circleci to prevent access to nexus credentials.

  1. Create a separate branch with a name release-<release-version>.
  2. Update current version in server/gradle.properties from -dev to a final version.
  3. Commit server/gradle.properties with the release version
  4. Push the changes to remote origin. shell script git push origin `release-<release-version>`
  5. create PR towards main branch and wait till circleci complete the build and release step.
  6. Go to https://app.circleci.com/ and approve the job releaseApproval
  7. Once the job is approved, circleci will publish the artifacts to maven central
  8. Merge the PR into main branch
  9. Checkout the latest main branch from remote origin in your local machine shell script git pull origin main
  10. Create a tag shell script git tag v<release-version> -m "Version <release-version>"
  11. Push the tag shell script git push origin <tag-name>

License

MIT license with an exception. See license file.