@@ -241,15 +241,7 @@ internal object PatchCommand : Runnable {
241
241
val explicitlyExcluded = excludedPatches.contains(formattedPatchName)
242
242
if (explicitlyExcluded) return @patch logger.info(" Excluding ${patch.patchName} " )
243
243
244
- // If the patch is implicitly included, it will be only included if [exclusive] is false.
245
- val implicitlyIncluded = ! exclusive && patch.include
246
- // If the patch is explicitly included, it will be included even if [exclusive] is false.
247
- val explicitlyIncluded = includedPatches.contains(formattedPatchName)
248
-
249
- val included = implicitlyIncluded || explicitlyIncluded
250
- if (! included) return @patch logger.info(" ${patch.patchName} excluded by default" ) // Case 1.
251
-
252
- // At last make sure the patch is compatible with the supplied APK files package name and version.
244
+ // Make sure the patch is compatible with the supplied APK files package name and version.
253
245
patch.compatiblePackages?.let { packages ->
254
246
packages.singleOrNull { it.name == packageName }?.let { `package` ->
255
247
val matchesVersion = force || `package`.versions.let {
@@ -269,6 +261,14 @@ internal object PatchCommand : Runnable {
269
261
return @let
270
262
} ? : logger.fine(" $formattedPatchName : No constraint on packages." )
271
263
264
+ // If the patch is implicitly included, it will be only included if [exclusive] is false.
265
+ val implicitlyIncluded = ! exclusive && patch.include
266
+ // If the patch is explicitly included, it will be included even if [exclusive] is false.
267
+ val explicitlyIncluded = includedPatches.contains(formattedPatchName)
268
+
269
+ val included = implicitlyIncluded || explicitlyIncluded
270
+ if (! included) return @patch logger.info(" ${patch.patchName} excluded by default" ) // Case 1.
271
+
272
272
logger.fine(" Adding $formattedPatchName " )
273
273
274
274
add(patch)
0 commit comments