Skip to content

Commit e3c8849

Browse files
committed
support AGP 8.5
1 parent a6cd454 commit e3c8849

File tree

2 files changed

+27
-12
lines changed

2 files changed

+27
-12
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55

66
This fork adds support for AGP 8.0+
77

8-
The solution of merging aar works with [AGP][3] 8.0 and higher. (Tested with AGP 8.3, and Gradle 8.6)
8+
The solution of merging aar works with [AGP][3] 8.5 and Gradle 8.7
99

1010
## Getting Started
1111

1212
### Step 1: Add classpath
1313
#### Add snippet below to your root build script file:
14-
For Maven Central (The lastest release is available on [Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.kezong/fat-aar)):
1514
```groovy
1615
buildscript {
1716
repositories {
@@ -23,7 +22,7 @@ buildscript {
2322
}
2423
}
2524
dependencies {
26-
classpath 'com.github.aasitnikov:fat-aar-android:1.4.0'
25+
classpath 'com.github.aasitnikov:fat-aar-android:1.4.1'
2726
}
2827
}
2928
```
@@ -119,6 +118,7 @@ See [anatomy of an aar file here][2].
119118
## Gradle Version Support
120119
| Version | Android Gradle Plugin | Gradle |
121120
|:---------------:|:---------------------:|:---------:|
121+
| 1.4.1 | 8.5 | 8.7 |
122122
| 1.4.0 | 8.3 | 8.6 |
123123
| 1.3.8 | 3.0.0+ | 4.9+ |
124124
| 1.3.6 | 3.0.0 - 4.2.0 | 4.9+ |
@@ -137,11 +137,13 @@ See [anatomy of an aar file here][2].
137137

138138
The following link which version of Gradle is required for each version of the Android Gradle plugin. For the best performance, you should use the latest possible version of both Gradle and the plugin.
139139

140-
[Plugin version and Required Gradle version](https://developer.android.google.cn/studio/releases/gradle-plugin.html)
140+
[Plugin version and Required Gradle version](https://developer.android.com/build/releases/gradle-plugin)
141141

142142
## Version Log
143-
- [1.4.0](<https://github.com/kezong/fat-aar-android/releases/tag/v1.4.0>)
144-
- Add support for AGP 8.3
143+
- [1.4.1](<https://github.com/aasitnikov/fat-aar-android/releases/tag/1.4.1>)
144+
- Support AGP 8.5
145+
- [1.4.0](<https://github.com/aasitnikov/fat-aar-android/releases/tag/1.4.0>)
146+
- Support AGP 8.3
145147
- [1.3.8](<https://github.com/kezong/fat-aar-android/releases/tag/v1.3.8>)
146148
- Fix the issue that plugin cannot be used in jdk 1.8 [#371](https://github.com/kezong/fat-aar-android/issues/371)
147149
- [1.3.7](<https://github.com/kezong/fat-aar-android/releases/tag/v1.3.7>)

source/src/main/groovy/com/kezong/fataar/VariantProcessor.groovy

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ class VariantProcessor {
7979
processGenerateProguard()
8080
processDataBinding(bundleTask)
8181
processRClasses(transform, bundleTask)
82+
processDeepLinkTasks()
8283
}
8384

8485
private static void printEmbedArtifacts(Collection<ResolvedArtifact> artifacts,
@@ -220,6 +221,18 @@ class VariantProcessor {
220221
}
221222
}
222223

224+
private void processDeepLinkTasks() {
225+
String taskName = "extractDeepLinksForAar${mVariant.name.capitalize()}"
226+
TaskProvider extractDeepLinks = mProject.tasks.named(taskName)
227+
if (extractDeepLinks == null) {
228+
throw new RuntimeException("Can not find task ${taskName}!")
229+
}
230+
231+
extractDeepLinks.configure {
232+
dependsOn(mExplodeTasks)
233+
}
234+
}
235+
223236
/**
224237
* copy data binding file must be do last in BundleTask, and reBundleTask will be package it.
225238
* @param bundleTask
@@ -469,13 +482,13 @@ class VariantProcessor {
469482

470483
resourceGenTask.configure {
471484
dependsOn(mExplodeTasks)
485+
}
472486

473-
for (archiveLibrary in mAndroidArchiveLibraries) {
474-
FatUtils.logInfo("Merge resource,Library res:${archiveLibrary.resFolder}")
475-
mVariant.registerGeneratedResFolders(
476-
mProject.files(archiveLibrary.resFolder)
477-
)
478-
}
487+
for (archiveLibrary in mAndroidArchiveLibraries) {
488+
FatUtils.logInfo("Merge resource,Library res:${archiveLibrary.resFolder}")
489+
mVariant.registerGeneratedResFolders(
490+
mProject.files(archiveLibrary.resFolder)
491+
)
479492
}
480493
}
481494

0 commit comments

Comments
 (0)