Skip to content

Commit

Permalink
Rename plugin id, add vcs link
Browse files Browse the repository at this point in the history
  • Loading branch information
creati8e committed Jan 18, 2019
1 parent 475c5b8 commit 9d32144
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 29 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id("com.android.application")
id("kotlin-android")
id(Plugins.dictgen)
id(Plugins.proguardDictionaries)
}

android {
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
dependencies {
classpath(BuildScriptPlugins.kotlin)
classpath(BuildScriptPlugins.android)
classpath(BuildScriptPlugins.dictgen)
classpath(BuildScriptPlugins.proguardDictionaries)
}
}

Expand All @@ -34,7 +34,7 @@ subprojects {
minSdkVersion(21)
targetSdkVersion(28)
versionCode = 1
versionName = Versions.projectVersion
versionName = Versions.projectVer
}

buildTypes {
Expand Down
26 changes: 16 additions & 10 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
import Versions.androidXVer
import Versions.gradlePluginVer
import Versions.kotlinVer
import Versions.projectVer

object Versions {
const val kotlin = "1.3.11"
const val androidX = "1.0.0"
const val gradlePlugin = "3.3.0"
const val projectVersion = "1.0.0"
const val kotlinVer = "1.3.11"
const val projectVer = "1.0.0"
const val androidXVer = "1.0.0"
const val gradlePluginVer = "3.3.0"
}

object BuildScriptPlugins {
const val dictgen = "ru.cleverpumpkin.dictgen:plugin:${Versions.projectVersion}"
const val android = "com.android.tools.build:gradle:${Versions.gradlePlugin}"
const val kotlin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}"
const val android = "com.android.tools.build:gradle:$gradlePluginVer"
const val kotlin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVer"
const val proguardDictionaries =
"ru.cleverpumpkin.proguard-dictionaries-generator:plugin:$projectVer"
}

object Plugins {
const val dictgen = "ru.cleverpumpkin.dictgen"
const val proguardDictionaries = "ru.cleverpumpkin.proguard-dictionaries-generator"
}

object Libraries {
const val kotlin = "org.jetbrains.kotlin:kotlin-stdlib:${Versions.kotlin}"
const val androidX = "androidx.appcompat:appcompat:${Versions.androidX}"
const val androidX = "androidx.appcompat:appcompat:$androidXVer"
const val kotlin = "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVer"
}
20 changes: 10 additions & 10 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ dependencies {
implementation(BuildScriptPlugins.android)
}

group = Plugins.dictgen
group = Plugins.proguardDictionaries

// Upload archive to rootProject/plugin/badgeRepo folder to test plugin locale.
// Use "uploadArchives" task.
tasks.named<Upload>("uploadArchives") {
repositories.withGroovyBuilder {
"mavenDeployer" {
Expand All @@ -28,22 +29,21 @@ tasks.named<Upload>("uploadArchives") {

// Add info for publication to plugin portal.
pluginBundle {
// TODO
vcsUrl = "TODO"
website = "TODO"
vcsUrl = "https://github.com/CleverPumpkin/Proguard-Dictionaries-Generator"
website = "https://github.com/CleverPumpkin/Proguard-Dictionaries-Generator"
description = "This is an Android gradle plugin that allows you to generate " +
"dictionary files for proguard"
"randomized dictionaries for proguard"
tags = listOf("android", "proguard", "generator", "dictionary", "obfuscation", "minification")
}

// Create plugin itself.
gradlePlugin {
plugins {
create("dictgenPlugin") {
id = Plugins.dictgen
version = Versions.projectVersion
displayName = "Proguard Dictionaries Generator "
implementationClass = "ru.cleverpumpkin.dictgen.ProguardDictionaryGeneratorPlugin"
create("plugin") {
version = Versions.projectVer
id = Plugins.proguardDictionaries
displayName = "Proguard Dictionaries Generator Plugin"
implementationClass = "ru.cleverpumpkin.plugin.ProguardDictionaryGeneratorPlugin"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.cleverpumpkin.dictgen
package ru.cleverpumpkin.plugin

import org.gradle.api.Plugin
import org.gradle.api.Project
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.cleverpumpkin.dictgen
package ru.cleverpumpkin.plugin

import org.gradle.api.DefaultTask
import org.gradle.api.tasks.TaskAction
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.cleverpumpkin.dictgen
package ru.cleverpumpkin.plugin

/**
* @author Sergey Chuprin
Expand All @@ -14,8 +14,11 @@ open class ProguardDictionaryPluginExtension {
}

var dictionaryNames = listOf<String>()
var minLineLength: Int = DEFAULT_MIN_LINE_LENGTH
var maxLineLength: Int = DEFAULT_MAX_LINE_LENGTH
var linesCountInDictionary: Int = DEFAULT_LINES_COUNT
var minLineLength: Int =
DEFAULT_MIN_LINE_LENGTH
var maxLineLength: Int =
DEFAULT_MAX_LINE_LENGTH
var linesCountInDictionary: Int =
DEFAULT_LINES_COUNT

}

0 comments on commit 9d32144

Please sign in to comment.