diff --git a/README.md b/README.md index 056424b..873cbaa 100644 --- a/README.md +++ b/README.md @@ -22,30 +22,34 @@ This gradle plugin can be used with any Android project in Java or Kotlin. # 1 - Install the plugin -Get the latest version of the plugin from [releases](https://github.com/klaxit/hidden-secrets-gradle-plugin/releases). -Copy `HiddenSecretsPlugin-X.Y.Z.jar` to your Android project in `/app/libs/` folder. +## Using the plugins DSL +In your app level `build.gradle`: +```gradle +plugins { + id "com.klaxit.hiddensecrets" version "X.Y.Z" +} +``` + +## Using legacy plugin application Add these lines in your app level `build.gradle`: ```gradle buildscript { - // Folder app/libs/ will be crawled repositories { - flatDir { dirs 'libs' } + maven { + url "https://plugins.gradle.org/m2/" + } } - // Add dependency to HiddenSecretsPlugin dependencies { - classpath("com.klaxit.hiddensecrets.gradle:HiddenSecretsPlugin:X.Y.Z") + classpath "com.klaxit.hiddensecrets:HiddenSecretsPlugin:X.Y.Z" } } -... - -// Apply HiddenSecretsPlugin to the project apply plugin: 'com.klaxit.hiddensecrets' ``` -Then sync your Android project. +For more details about the installation check the [plugin's page](https://plugins.gradle.org/plugin/com.klaxit.hiddensecrets) on gradle.org. # 2 - Hide secret key in your project diff --git a/build.gradle.kts b/build.gradle.kts index 4797576..465ac06 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,8 @@ plugins { + id("com.gradle.plugin-publish") version "0.12.0" `java-gradle-plugin` `kotlin-dsl` + `maven-publish` } group = "com.klaxit.hiddensecrets" @@ -23,10 +25,18 @@ configure { sourceCompatibility = JavaVersion.VERSION_1_8 } +pluginBundle { + website = "https://github.com/klaxit/hidden-secrets-gradle-plugin" + vcsUrl = "https://github.com/klaxit/hidden-secrets-gradle-plugin.git" + tags = listOf("gradle", "plugin", "android", "hide", "secret", "key", "string", "obfuscate") +} + gradlePlugin { plugins { create("HiddenSecretsPlugin") { id = "com.klaxit.hiddensecrets" + displayName = "Hidden Secrets Plugin" + description = "This plugin allows any Android developer to deeply hide secrets in its project to prevent credentials harvesting." implementationClass = "com.klaxit.hiddensecrets.HiddenSecretsPlugin" } }