Skip to content

Commit 72b2c56

Browse files
committed
fix(task/changelog): fix configuration issues for fileSets under gradle-kotlin
------------ # Locales - **[zh-cn]** 修复 gradle-kotlin 下的 `fileSets` 配置问题
1 parent c9dbbcd commit 72b2c56

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

src/main/java/team/yi/gradle/plugin/ChangelogTask.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,13 @@ public Set<FileSet> getFileSets() {
3030
return this.fileSets;
3131
}
3232

33-
public void setFileSets(final List<Closure<?>> closures) {
33+
@SuppressWarnings("PMD.MethodArgumentCouldBeFinal")
34+
public void setFileSets(List<Closure<FileSet>> fileSets) {
35+
log.info("{}", fileSets.size());
36+
3437
this.fileSets = new HashSet<>();
3538

36-
for (final Closure<?> closure : closures) {
39+
for (final Closure<FileSet> closure : fileSets) {
3740
final FileSet fileSet = new FileSet();
3841

3942
ConfigureUtil.configure(closure, fileSet);
@@ -44,6 +47,11 @@ public void setFileSets(final List<Closure<?>> closures) {
4447
}
4548
}
4649

50+
@SuppressWarnings("PMD.MethodArgumentCouldBeFinal")
51+
public void setFileSets(Set<FileSet> fileSets) {
52+
this.fileSets = fileSets;
53+
}
54+
4755
@Override
4856
public void execute(final GitRepo gitRepo) throws IOException {
4957
this.saveToFile(gitRepo);

0 commit comments

Comments
 (0)