Skip to content

Commit

Permalink
fix: revert the applicationId to versionName
Browse files Browse the repository at this point in the history
  • Loading branch information
2BAB committed Mar 18, 2020
1 parent 36e308a commit 2497bae
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -57,7 +57,7 @@ scratchPaper {
extraInfo = new Date().format("MM-dd,HH:mm")
enableGenerateIconOverlay = true
enableGenerateBuildInfo = true
enableApplicationIdSuffixDisplay = true
enableVersionNameSuffixDisplay = true
// Experimental field
// @see IconOverlayGenerator#removeXmlIconFiles
Expand All @@ -77,7 +77,7 @@ ScratchPaper is only supported & tested on LATEST ONE Minor versions of Android

AGP Version|Compatible Status
-----------|-----------------
3.6.x (Aapt2) | Support (last support version - 2.5.0)
3.6.x (Aapt2) | Support (last support version - 2.5.1)
3.5.x (Aapt2) | Support (last support version - 2.4.2)
3.4.x (Aapt2) | Support (last support version - 2.4.1)
3.3.x (Aapt2) | Support (last support version - 2.4.1)
Expand Down
4 changes: 2 additions & 2 deletions README_zh.md
Expand Up @@ -66,7 +66,7 @@ scratchPaper {
extraInfo = new Date().format("MM-dd,HH:mm")
enableGenerateIconOverlay = true
enableGenerateBuildInfo = true
enableApplicationIdSuffixDisplay = true
enableVersionNameSuffixDisplay = true
// Experimental field
// @see IconOverlayGenerator#removeXmlIconFiles
Expand All @@ -86,7 +86,7 @@ scratchPaper {

AGP Version|Compatible Status
-----------|-----------------
3.6.x (Aapt2) | Support (last support version - 2.5.0)
3.6.x (Aapt2) | Support (last support version - 2.5.1)
3.5.x (Aapt2) | Support (last support version - 2.4.2)
3.4.x (Aapt2) | Support (last support version - 2.4.1)
3.3.x (Aapt2) | Support (last support version - 2.4.1)
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Expand Up @@ -57,6 +57,6 @@ if (project.extensions.findByName("buildScan") != null) {

// publish
group 'me.2bab'
version '2.5.0'
version '2.5.1'
apply from: 'bintray.gradle'
apply from: 'mavenlocal.gradle'
6 changes: 3 additions & 3 deletions sample/app/build.gradle
Expand Up @@ -10,16 +10,16 @@ android {
minSdkVersion 16
targetSdkVersion 28
versionCode 3
versionName "2.5.0"
versionName "2.5.1"
}
buildTypes {
debug {
minifyEnabled false
applicationIdSuffix ".debug"
versionNameSuffix "-debug"
}
release {
minifyEnabled false
applicationIdSuffix ".debug"
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
Expand Down Expand Up @@ -63,5 +63,5 @@ scratchPaper {
enableGenerateIconOverlay = true
enableGenerateBuildInfo = true
enableXmlIconRemove = false
enableApplicationIdSuffixDisplay = true
enableVersionNameSuffixDisplay = true
}
2 changes: 1 addition & 1 deletion sample/build.gradle
Expand Up @@ -8,7 +8,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'me.2bab:scratch-paper:2.5.0'
classpath 'me.2bab:scratch-paper:2.5.1'
}
}

Expand Down
Expand Up @@ -34,9 +34,9 @@ class IconOverlayGenerator(private val params: GeneratorParams) {
output.processResourcesProvider.get().doFirst("process${params.dimension}IconsByScratchPaper") {
val processedIcons = arrayListOf<File>()
var version = "@" + params.variant.mergedFlavor.versionName
if (params.config.enableApplicationIdSuffixDisplay) {
val buildTypeVersionSuffix = params.variant.buildType.applicationIdSuffix ?: ""
val flavorVersionSuffix = params.variant.mergedFlavor.applicationIdSuffix ?: ""
if (params.config.enableVersionNameSuffixDisplay) {
val buildTypeVersionSuffix = params.variant.buildType.versionNameSuffix ?: ""
val flavorVersionSuffix = params.variant.mergedFlavor.versionNameSuffix ?: ""
version += buildTypeVersionSuffix + flavorVersionSuffix
}
val iconNames = getIconName(processManifestTask.manifestOutputDirectory.get().asFile)
Expand Down
Expand Up @@ -28,7 +28,7 @@ open class ScratchPaperExtension {
// @see IconOverlayGenerator#removeXmlIconFiles
var enableXmlIconRemove = false

var enableApplicationIdSuffixDisplay = true
var enableVersionNameSuffixDisplay = true


fun getBackgroundColor(): Color {
Expand Down

0 comments on commit 2497bae

Please sign in to comment.