-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug fixed: update splits maybe occur exception under incremental build.
- Loading branch information
1 parent
30bba52
commit 6bf8aa9
Showing
12 changed files
with
182 additions
and
88 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
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
54 changes: 54 additions & 0 deletions
54
...main/groovy/com/iqiyi/qigsaw/buildtool/gradle/extension/QigsawSplitExtensionHelper.groovy
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,54 @@ | ||
package com.iqiyi.qigsaw.buildtool.gradle.extension | ||
|
||
import org.gradle.api.Project | ||
|
||
class QigsawSplitExtensionHelper { | ||
|
||
static String getSplitInfoVersion(Project project) { | ||
try { | ||
return project.extensions.qigsawSplit.splitInfoVersion | ||
} catch (Throwable e) { | ||
return QigsawSplitExtension.DEFAULT_SPLIT_INFO_VERSION | ||
} | ||
} | ||
|
||
static String getOldApk(Project project) { | ||
try { | ||
String oldApk = project.extensions.tinkerPatch.oldApk | ||
if (oldApk != null && new File(oldApk).exists()) { | ||
return oldApk | ||
} | ||
} catch (Throwable ignored) { | ||
|
||
} | ||
try { | ||
return project.extensions.qigsawSplit.oldApk | ||
} catch (Throwable ignored) { | ||
return QigsawSplitExtension.EMPTY | ||
} | ||
} | ||
|
||
static boolean getReleaseSplitApk(Project project) { | ||
try { | ||
return project.extensions.qigsawSplit.releaseSplitApk | ||
} catch (Throwable ignored) { | ||
return false | ||
} | ||
} | ||
|
||
static List<String> getRestrictWorkProcessesForSplits(Project project) { | ||
try { | ||
return project.extensions.qigsawSplit.restrictWorkProcessesForSplits | ||
} catch (Throwable ignored) { | ||
return Collections.emptyList() | ||
} | ||
} | ||
|
||
static String getApplyMapping(Project project) { | ||
try { | ||
return project.extensions.qigsawSplit.applyMapping | ||
} catch (Throwable ignored) { | ||
return QigsawSplitExtension.EMPTY | ||
} | ||
} | ||
} |
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
Oops, something went wrong.