Skip to content

Commit

Permalink
All Gradle tasks return their result object
Browse files Browse the repository at this point in the history
  • Loading branch information
DoodleBobBuffPants committed Oct 11, 2021
1 parent ea77d7f commit 751a2fa
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public FlywayBaselineTask() {

@Override
protected Object run(Flyway flyway) {
flyway.baseline();
return null;
return flyway.baseline();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public FlywayCleanTask() {

@Override
protected Object run(Flyway flyway) {
flyway.clean();
return null;
return flyway.clean();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ protected Object run(Flyway flyway) {
MigrationVersion currentSchemaVersion = current == null ? MigrationVersion.EMPTY : current.getVersion();
System.out.println("Schema version: " + currentSchemaVersion);
System.out.println(MigrationInfoDumper.dumpToAsciiTable(info.all()));
return null;
return info;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public FlywayRepairTask() {

@Override
protected Object run(Flyway flyway) {
flyway.repair();
return null;
return flyway.repair();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
public class FlywayValidateTask extends AbstractFlywayTask {
public FlywayValidateTask() {
super();
setDescription("Validate applied migrations against resolved ones (on the filesystem or classpath)" +
" to detect accidental changes that may prevent the schema(s) from being recreated exactly." +
" Validation fails if differences in migration names, types or checksums are found, " +
"versions have been applied that aren\"t resolved locally anymore or" +
" versions have been resolved that haven\"t been applied yet");
setDescription("Validate applied migrations against resolved ones (on the filesystem or classpath) " +
"to detect accidental changes that may prevent the schema(s) from being recreated exactly. " +
"Validation fails if differences in migration names, types or checksums are found, " +
"versions have been applied that aren\"t resolved locally anymore or " +
"versions have been resolved that haven\"t been applied yet");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
threadSafe = true)
public class BaselineMojo extends AbstractFlywayMojo {
@Override
protected void doExecute(Flyway flyway) throws Exception {
protected void doExecute(Flyway flyway) {
flyway.baseline();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
threadSafe = true)
public class CleanMojo extends AbstractFlywayMojo {
@Override
protected void doExecute(Flyway flyway) throws Exception {
protected void doExecute(Flyway flyway) {
flyway.clean();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
threadSafe = true)
public class MigrateMojo extends AbstractFlywayMojo {
@Override
protected void doExecute(Flyway flyway) throws Exception {
protected void doExecute(Flyway flyway) {
flyway.migrate();

MigrationInfo current = flyway.info().current();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
threadSafe = true)
public class RepairMojo extends AbstractFlywayMojo {
@Override
protected void doExecute(Flyway flyway) throws Exception {
protected void doExecute(Flyway flyway) {
flyway.repair();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
threadSafe = true)
public class ValidateMojo extends AbstractFlywayMojo {
@Override
protected void doExecute(Flyway flyway) throws Exception {
protected void doExecute(Flyway flyway) {
flyway.validate();
}
}

0 comments on commit 751a2fa

Please sign in to comment.