Skip to content

Commit 2d2cf8e

Browse files
author
wangshuwen15222
committed
feat:plugin去除对ImmutableSet的依赖
1 parent 9e27b9c commit 2d2cf8e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ android.useAndroidX=true
1919
android.enableJetifier=true
2020

2121
debug = true
22-
pluginVersion = 1.0.7
22+
pluginVersion = 1.0.8
2323
annotationVersion = 1.0.8
2424
compilerVersion = 1.0.8
2525
coreVersion = 1.0.8

xrouter_plugin/src/main/java/cn/cheney/xrouter/plugin/XRouterTransform.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
import com.android.build.gradle.internal.pipeline.TransformManager;
1212

1313
import org.apache.commons.io.FileUtils;
14-
import org.gradle.internal.impldep.com.google.common.collect.ImmutableSet;
1514

1615
import java.io.File;
1716
import java.io.IOException;
1817
import java.util.ArrayList;
1918
import java.util.Collection;
19+
import java.util.HashSet;
2020
import java.util.List;
2121
import java.util.Set;
2222

@@ -90,9 +90,11 @@ public void transform(TransformInvocation transformInvocation) throws TransformE
9090
}
9191
}
9292
}
93+
Set<QualifiedContent.Scope> scopeSet = new HashSet<>();
94+
scopeSet.add(QualifiedContent.Scope.PROJECT);
9395
File dest = transformInvocation.getOutputProvider().getContentLocation("XRouter",
9496
TransformManager.CONTENT_CLASS,
95-
ImmutableSet.of(QualifiedContent.Scope.PROJECT),
97+
scopeSet,
9698
Format.DIRECTORY);
9799
for (String moduleStr : allModuleClassList) {
98100
XLogger.debug("scan router module ===>" + moduleStr);

0 commit comments

Comments
 (0)