Skip to content

Commit

Permalink
Merge pull request #5 from JingYeoh/bugfix/issue/1
Browse files Browse the repository at this point in the history
bugfix issue #4
  • Loading branch information
JingYeoh committed Nov 26, 2019
2 parents c9de3ec + 63914ba commit f9545e1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gradle/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ versions.gradletools = "3.2.1"
versions.kotlin = "1.3.0"
versions.java = "8"
//versions.aabresguard = "0.1.0-beta-7"
versions.aabresguard = "0.1.0"
versions.aabresguard = "0.1.1"
// android
versions.compileSdkVersion = 28
versions.minSdkVersion = 15
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.bytedance.android.plugin.tasks

import com.android.build.gradle.internal.dsl.CoreSigningConfig
import com.android.build.gradle.internal.scope.VariantScope
import com.android.build.gradle.internal.tasks.BundleTask
import com.bytedance.android.aabresguard.commands.ObfuscateBundleCommand
import com.bytedance.android.plugin.extensions.AabResGuardExtension
import org.gradle.api.DefaultTask
Expand Down Expand Up @@ -30,9 +29,9 @@ open class AabResGuardTask : DefaultTask() {

fun setVariantScope(variantScope: VariantScope) {
this.variantScope = variantScope
val bundlePackageTask: BundleTask = project.tasks.getByName("package${variantScope.variantData.name.capitalize()}Bundle") as BundleTask
bundlePath = File(bundlePackageTask.bundleLocation, bundlePackageTask.fileName).toPath()
obfuscatedBundlePath = File(bundlePackageTask.bundleLocation, aabResGuard.obfuscatedBundleFileName).toPath()
val bundlePackageTask = project.tasks.getByName("package${variantScope.variantData.name.capitalize()}Bundle")
bundlePath = File(bundlePackageTask.property("bundleLocation") as File, bundlePackageTask.property("fileName") as String).toPath()
obfuscatedBundlePath = File(bundlePackageTask.property("bundleLocation") as File, aabResGuard.obfuscatedBundleFileName).toPath()
}

fun getObfuscatedBundlePath(): Path {
Expand Down
4 changes: 4 additions & 0 deletions wiki/en/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

# Change log

## 0.1.1(2019/11/26)
- Compatible with Gradle high version.
- Fix issue [#4](https://github.com/bytedance/AabResGuard/issues/4)

## 0.1.0(2019/10/16)
- Add support for resources obfuscation
- Add support for merge duplicated resources
Expand Down
4 changes: 4 additions & 0 deletions wiki/zh-cn/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

# 版本日志

## 0.1.1(2019/11/26)
- 适配 Gradle 高版本.
- Fix issue [#4](https://github.com/bytedance/AabResGuard/issues/4)

## 0.1.0(2019/10/16)
- 添加资源混淆功能
- 添加资源去重功能
Expand Down

0 comments on commit f9545e1

Please sign in to comment.