diff --git a/.gitignore b/.gitignore
index 5486435..641dd4c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,7 @@
*.iml
.gradle
/local.properties
-/.idea/codeStyles
+/.idea
.DS_Store
/build
/captures
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index 30aa626..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/README.md b/README.md
index 0187862..ad6f7e8 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@ buildscript {
gradlePluginPortal()
dependencies {
- classpath "gradle.plugin.ru.cleverpumpkin.proguard-dictionaries-generator:plugin:1.0.0"
+ classpath "gradle.plugin.ru.cleverpumpkin.proguard-dictionaries-generator:plugin:1.0.1"
}
}
```
@@ -23,9 +23,9 @@ apply plugin: "ru.cleverpumpkin.proguard-dictionaries-generator"
proguardDictionaries {
dictionaryNames = [
- "class-dictionary",
- "package-dictionary",
- "obfuscation-dictionary"
+ "build/class-dictionary",
+ "build/package-dictionary",
+ "build/obfuscation-dictionary"
]
}
```
@@ -35,16 +35,18 @@ plugins {
id("ru.cleverpumpkin.proguard-dictionaries-generator")
}
proguardDictionaries {
- dictionaryNames = dictionaryNames = listOf(
- "class-dictionary",
- "package-dictionary",
- "obfuscation-dictionary"
+ dictionaryNames = listOf(
+ "build/class-dictionary",
+ "build/package-dictionary",
+ "build/obfuscation-dictionary"
)
}
```
This simple setup will generate file `class-dictionary.txt`
in `build` folder of module on which plugin applied.
-This file generated on each build
+You can specify any directory relatively to your module's root.
+
+These files are generated on each build
(so you'll get different dictionary on each build)
### Advanced configuration
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 05e8f7d..ba7080e 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -12,9 +12,9 @@ android {
proguardDictionaries {
dictionaryNames = listOf(
- "class-dictionary",
- "package-dictionary",
- "obfuscation-dictionary"
+ "build/class-dictionary",
+ "build/package-dictionary",
+ "build/obfuscation-dictionary"
)
}
diff --git a/build.gradle.kts b/build.gradle.kts
index dd8fd94..5070120 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -37,11 +37,6 @@ subprojects {
versionName = Versions.projectVer
}
- buildTypes {
- maybeCreate("debug")
- maybeCreate("release")
- }
-
buildTypes {
maybeCreate("release").apply {
isDebuggable = false
@@ -49,7 +44,7 @@ subprojects {
signingConfig = signingConfigs.getByName("debug")
proguardFiles(
- getDefaultProguardFile("proguard-android.txt"),
+ getDefaultProguardFile("proguard-android-optimize.txt"),
File("proguard-rules.pro")
)
}
diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt
index e0551c2..23e9acb 100644
--- a/buildSrc/src/main/kotlin/Dependencies.kt
+++ b/buildSrc/src/main/kotlin/Dependencies.kt
@@ -5,7 +5,7 @@ import Versions.projectVer
object Versions {
const val kotlinVer = "1.3.11"
- const val projectVer = "1.0.0"
+ const val projectVer = "1.0.1"
const val androidXVer = "1.0.0"
const val gradlePluginVer = "3.3.0"
}
diff --git a/plugin/src/main/java/ru/cleverpumpkin/plugin/ProguardDictionaryGeneratorTask.kt b/plugin/src/main/java/ru/cleverpumpkin/plugin/ProguardDictionaryGeneratorTask.kt
index edd8c8a..732ab18 100644
--- a/plugin/src/main/java/ru/cleverpumpkin/plugin/ProguardDictionaryGeneratorTask.kt
+++ b/plugin/src/main/java/ru/cleverpumpkin/plugin/ProguardDictionaryGeneratorTask.kt
@@ -37,9 +37,8 @@ open class ProguardDictionaryGeneratorTask @Inject constructor(
}
}
- val projectBuildDir = project.buildDir.apply { createNewFile() }
- File("$projectBuildDir/$dictionaryName.txt").run {
- createNewFile()
+ File(project.projectDir, "$dictionaryName.txt").run {
+ parentFile.mkdirs()
writeText(dictionarySet.joinToString("\n"))
}
}
diff --git a/plugin/src/main/java/ru/cleverpumpkin/plugin/ProguardDictionaryPluginExtension.kt b/plugin/src/main/java/ru/cleverpumpkin/plugin/ProguardDictionaryPluginExtension.kt
index 217477d..6e4a4d9 100644
--- a/plugin/src/main/java/ru/cleverpumpkin/plugin/ProguardDictionaryPluginExtension.kt
+++ b/plugin/src/main/java/ru/cleverpumpkin/plugin/ProguardDictionaryPluginExtension.kt
@@ -14,11 +14,8 @@ open class ProguardDictionaryPluginExtension {
}
var dictionaryNames = listOf()
- 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
}
\ No newline at end of file