polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulmer...@apache.org
Subject [7/7] polygene-java git commit: build: supports published project that are not Java projects
Date Sun, 23 Apr 2017 11:07:37 GMT
build: supports published project that are not Java projects


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/53ae77b7
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/53ae77b7
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/53ae77b7

Branch: refs/heads/develop
Commit: 53ae77b735c9225fab234d1812ecd292985d5f4d
Parents: 947ee2d
Author: Paul Merlin <paulmerlin@apache.org>
Authored: Sun Apr 23 13:07:00 2017 +0200
Committer: Paul Merlin <paulmerlin@apache.org>
Committed: Sun Apr 23 13:07:00 2017 +0200

----------------------------------------------------------------------
 .../gradle/structure/reports/ReportsPlugin.groovy         | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/53ae77b7/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/reports/ReportsPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/reports/ReportsPlugin.groovy
b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/reports/ReportsPlugin.groovy
index 346005f..7b9dd21 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/reports/ReportsPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/reports/ReportsPlugin.groovy
@@ -149,10 +149,12 @@ class ReportsPlugin implements Plugin<Project>
       }
       apiSources.each { Project apiProject ->
         apiProject.afterEvaluate { Project evaluatedApiProject ->
-          def mainSourceSet = evaluatedApiProject.convention.getPlugin( JavaPluginConvention
)
-                                                 .sourceSets.getByName( 'main' )
-          task.source mainSourceSet.allJava
-          task.classpath += mainSourceSet.compileClasspath
+          def javaConvention = evaluatedApiProject.convention.findPlugin( JavaPluginConvention
)
+          if(javaConvention) {
+              def mainSourceSet = javaConvention.sourceSets.getByName( 'main' )
+              task.source mainSourceSet.allJava
+              task.classpath += mainSourceSet.compileClasspath
+          }
         }
       }
     }


Mime
View raw message