Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions android_build_files/generate_proguard.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def generateCppProguard(File library, String outCppPro) {
// proguardSet: The set of proguard files to use.
// outputProguard: The path to the output proguard file.
def generateFinalProguard(Set<File> proguardSet, String outputProguard) {

Set<String> proguardLineSet = new HashSet<String>()
for (File pro : proguardSet) {
for (String line : pro.text.split("[\\r\\n]+")) {
Expand Down Expand Up @@ -79,9 +80,12 @@ def defineGenerateProguardFile(String subproject, String buildType,
Set<File> librarySet = fileTree("$nativeBuildDir")
.matching({ include "**/*firebase_${subproject}*" }).getFiles()
String cppProguard = "$buildDir/cpp_${subproject}.pro"
if (!librarySet.isEmpty()) {
while (!librarySet.isEmpty()) {
File lib = librarySet.iterator().next()
generateCppProguard(lib, cppProguard)
librarySet.remove(lib)
if (lib.name.endsWith(".a")) {
generateCppProguard(lib, cppProguard)
}
}

// Combine the proguard files into a single file.
Expand Down