Skip to content

Commit

Permalink
Gradle: Always apply JavaBasePlugin, otherwise startup may fail with …
Browse files Browse the repository at this point in the history
…new plugin DSL, as initialization order is undefined. This closes #144
  • Loading branch information
uschindler committed Sep 2, 2018
1 parent 776ef98 commit 965e457
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@

import java.lang.reflect.Modifier;
import org.gradle.api.plugins.JavaBasePlugin;
import org.gradle.api.plugins.PluginInstantiationException;

if (project.plugins.withType(JavaBasePlugin.class).isEmpty()) {
throw new PluginInstantiationException('Forbidden-apis only works in projects using the java plugin.');
}
project.plugins.apply(JavaBasePlugin.class);

// check if running in Gradle Daemon?
// see: http://stackoverflow.com/questions/23265217/how-to-know-whether-you-are-running-inside-a-gradle-daemon
Expand Down

0 comments on commit 965e457

Please sign in to comment.