Skip to content

Commit

Permalink
Merge pull request bytedance#31 from bytedance/release/0.1.6
Browse files Browse the repository at this point in the history
Release/0.1.6
  • Loading branch information
JingYeoh authored Apr 21, 2020
2 parents 618f25d + 762a2ec commit ad809f4
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
6 changes: 2 additions & 4 deletions gradle/versions.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
def versions = [:]
versions.agp = "3.2.0"
versions.kotlin = "1.3.0"
versions.agp = "4.0.0-alpha09"
versions.agp = "3.5.0"
versions.kotlin = "1.3.61"
versions.java = "8"
versions.aabresguard = "0.1.5"
versions.aabresguard = "0.1.6"
// android
versions.compileSdkVersion = 28
versions.minSdkVersion = 15
Expand Down
1 change: 1 addition & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ zipStorePath=wrapper/dists
#distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
#distributionUrl=https\://services.gradle.org/distributions/gradle-6.1-milestone-2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1-rc-1-all.zip
#distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ internal fun getAGPVersion(project: Project): String {
.resolvedConfiguration.resolvedArtifacts) {
val identifier = artifact.id.componentIdentifier
if (identifier is DefaultModuleComponentIdentifier) {
if (identifier.group == "com.android.tools.build") {
if (identifier.group == "com.android.tools.build" || identifier.group.hashCode() == 432891823) {
if (identifier.module == "gradle") {
agpVersion = identifier.version
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.bytedance.android.plugin.internal

import com.android.build.gradle.internal.VariantManager
import com.android.build.gradle.internal.scope.VariantScope
import com.android.build.gradle.internal.variant.VariantInputModel
import com.bytedance.android.plugin.model.SigningConfig
import org.gradle.api.GradleException
import org.gradle.api.Project
Expand Down Expand Up @@ -74,8 +73,9 @@ private fun getBuildTypesForAGP4009(variantManager: VariantManager): Map<*, *>?
return try {
val variantInputModelField = variantManager::class.java.getDeclaredField("variantInputModel")
variantInputModelField.isAccessible = true
val variantInputModel = variantInputModelField.get(variantManager) as VariantInputModel
variantInputModel.buildTypes
val variantInputModel = variantInputModelField.get(variantManager)
val buildTypesField = variantInputModel::class.java.getField("buildTypes")
return buildTypesField.get(variantInputModel) as Map<*, *>?
} catch (e: Exception) {
null
}
Expand Down
3 changes: 3 additions & 0 deletions wiki/en/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
**[English](CHANGELOG.md)** | [简体中文](../zh-cn/CHANGELOG.md)

# Change log
## 0.1.6(2020/4/21)
- Compatible wit `AGP-3.5.0`
- Bugfix: `Fix get AGP version failed issue`

## 0.1.5(2020/4/5)
- Compatible with `AGP-4.0.0-alpha09`
Expand Down
3 changes: 3 additions & 0 deletions wiki/zh-cn/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[English](../en/CHANGELOG.md) | **[简体中文](CHANGELOG.md)**

# 版本日志
## 0.1.6(2020/4/21)
- 适配 `AGP-3.5.0`
- 修复获取 `AGP` 版本号失败的问题

## 0.1.5(2020/4/5)
- 适配 `AGP-4.0.0-alpha09`
Expand Down

0 comments on commit ad809f4

Please sign in to comment.