-
Notifications
You must be signed in to change notification settings - Fork 550
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add build_api18 step for verifying keystore implementation for 18-22 …
…API levels
- Loading branch information
Karthikeyan Vasuki Balasubramaniam
committed
May 23, 2019
1 parent
229ead4
commit 7f31921
Showing
4 changed files
with
98 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from utils import replacefiles | ||
import demjson | ||
import sys | ||
import re | ||
import os | ||
root = sys.argv[1] | ||
|
||
replaces = [ | ||
{ | ||
"match" : 'android-23', | ||
"replace" : 'android-18', | ||
"files" : [ | ||
"aws-android-sdk-core/build.gradle" | ||
] | ||
} | ||
] | ||
replacefiles(root, replaces) | ||
|
||
AWSKeyValueStoreFile = os.path.join(root,"aws-android-sdk-core/src/main/java/com/amazonaws/internal/keyvaluestore/AWSKeyValueStore.java") | ||
newcontent = "" | ||
with open(AWSKeyValueStoreFile, 'r') as myfile: | ||
content = myfile.read() | ||
pattern = r'//@apiLevel23Start[\s\S]*?//@apiLevel23End' | ||
repl = r"" | ||
newcontent = re.sub(pattern, repl, content) | ||
|
||
with open(AWSKeyValueStoreFile,"w") as myfile: | ||
myfile.write(newcontent) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters