Skip to content

Commit 2008044

Browse files
cynthiajoanCynthia Jiang
and
Cynthia Jiang
authored
Fix the logic to generate .pro file (#664)
* Fix the logic to generate .pro file * update readme file * modify the release notes Co-authored-by: Cynthia Jiang <[email protected]>
1 parent a1b972f commit 2008044

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

android_build_files/generate_proguard.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def generateCppProguard(File library, String outCppPro) {
4444
// proguardSet: The set of proguard files to use.
4545
// outputProguard: The path to the output proguard file.
4646
def generateFinalProguard(Set<File> proguardSet, String outputProguard) {
47+
4748
Set<String> proguardLineSet = new HashSet<String>()
4849
for (File pro : proguardSet) {
4950
for (String line : pro.text.split("[\\r\\n]+")) {
@@ -79,9 +80,12 @@ def defineGenerateProguardFile(String subproject, String buildType,
7980
Set<File> librarySet = fileTree("$nativeBuildDir")
8081
.matching({ include "**/*firebase_${subproject}*" }).getFiles()
8182
String cppProguard = "$buildDir/cpp_${subproject}.pro"
82-
if (!librarySet.isEmpty()) {
83+
while (!librarySet.isEmpty()) {
8384
File lib = librarySet.iterator().next()
84-
generateCppProguard(lib, cppProguard)
85+
librarySet.remove(lib)
86+
if (lib.name.endsWith(".a")) {
87+
generateCppProguard(lib, cppProguard)
88+
}
8589
}
8690

8791
// Combine the proguard files into a single file.

release_build_files/readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,8 @@ code.
570570
### 8.5.0
571571
- Changes
572572
- General: Updating Android and iOS dependencies to the latest.
573+
- General: Fix the generating of proguard file
574+
([#664](https://github.com/firebase/firebase-cpp-sdk/pull/664)).
573575

574576
### 8.4.0
575577
- Changes

0 commit comments

Comments
 (0)