1. shemnon
  2. javafx-gradle

Commits

shemnon  committed 58d8835

set the main when configured by convention

  • Participants
  • Parent commits a1a5cfb
  • Branches master

Comments (0)

Files changed (1)

File gradle-javafx-plugin/src/main/groovy/org/bitbucket/shemnon/javafxplugin/JavaFXPlugin.groovy

View file
     
     protected mainClassConvention = {convention, aware ->
         if (!project.javafx.mainClass) { 
-            
             def mains = []
             sourceSet(project).allJava.visit {
                 if (it.relativePath.lastName == 'Main.java') {
             }
     
             if (mains.size() == 1) {
-                project.javafx.mainClass
+                project.javafx.mainClass = mains[0]
             }
         }
         return project.javafx.mainClass