Skip to content

Commit 968c32e

Browse files
committed
(multi-os-engine/multi-os-engine#169) Fix empty input file error when build project again
1 parent a486c8c commit 968c32e

File tree

1 file changed

+2
-7
lines changed
  • src/main/java/org/moe/gradle/tasks

1 file changed

+2
-7
lines changed

src/main/java/org/moe/gradle/tasks/Dex.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,10 @@ public void setDestDir(@Nullable Object destDir) {
111111
this.destDir = destDir;
112112
}
113113

114-
private HashSet<File> destJars = new HashSet<>();
115-
116114
@Internal
117115
@NotNull
118-
public HashSet<File> getDestJars() {
119-
return new HashSet<>(destJars);
116+
public Set<File> getDestJars() {
117+
return getProject().fileTree(getDestDir()).filter(it->it.isFile() && it.getName().endsWith(".jar")).getFiles();
120118
}
121119

122120
@Override
@@ -127,13 +125,10 @@ protected void run() {
127125
throw new GradleException("an IOException occurred", e);
128126
}
129127
getDestDir().mkdirs();
130-
destJars.clear();
131128

132129
int index = 0;
133130
for (File f : getInputFiles()) {
134131
File out = new File(getDestDir(), "classes-" + index + ".jar");
135-
destJars.add(out);
136-
137132
LOG.info("Dxing {} to {}...", f, out);
138133

139134
javaexec(spec -> {

0 commit comments

Comments
 (0)