Skip to content

Commit

Permalink
Config to release the plugin on https://plugins.gradle.org/
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-j69 committed Nov 26, 2020
1 parent 99d4f61 commit 6a2676a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 10 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -23,10 +25,18 @@ configure<JavaPluginConvention> {
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"
}
}
Expand Down

0 comments on commit 6a2676a

Please sign in to comment.