Skip to content

Commit

Permalink
[atlas-plugin] geneate awb so to assets dir
Browse files Browse the repository at this point in the history
  • Loading branch information
jiawulu committed Oct 18, 2017
1 parent 7340cdc commit db786df
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,17 @@ public Map<String, DataBindingProcessLayoutsTask> getDataBindingProcessLayoutsTa

public File getAwbPackageOutputFile(AwbBundle awbBundle) {
String awbOutputName = awbBundle.getAwbSoName();
File file = new File(variantContext.getAwbApkOutputDir(),
"lib/armeabi" + File.separator + awbOutputName);
file.getParentFile().mkdirs();

Set<String> libSoNames = variantContext.getAtlasExtension().getTBuildConfig().getKeepInLibSoNames();

File file = null;
if (libSoNames.isEmpty() || libSoNames.contains(awbOutputName)) {
file = new File(variantContext.getAwbApkOutputDir(),
"lib/armeabi" + File.separator + awbOutputName);
file.getParentFile().mkdirs();
}else {
file = new File(variantContext.getVariantData().mergeAssetsTask.getOutputDir(), awbOutputName);
}

awbBundle.outputBundleFile = file;
return file;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@ public class TBuildConfig {

private int proguardParallelCount = 8;

@Config(message = "put awb so in lib/armeabi , not assets dir", order = 19, advance = true, group = "atlas")
private Set<String> keepInLibSoNames = new HashSet<>();

public Set<String> getRemoveSoFiles() {
return removeSoFiles;
}
Expand Down Expand Up @@ -570,4 +573,12 @@ public boolean isDexNetworkCacheEnabled() {
public void setDexNetworkCacheEnabled(boolean dexNetworkCacheEnabled) {
this.dexNetworkCacheEnabled = dexNetworkCacheEnabled;
}

public Set<String> getKeepInLibSoNames() {
return keepInLibSoNames;
}

public void setKeepInLibSoNames(Set<String> keepInLibSoNames) {
this.keepInLibSoNames = keepInLibSoNames;
}
}

0 comments on commit db786df

Please sign in to comment.