buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject [4/6] buildr git commit: Update the Intellij IDEA plugin to support marking directories as generated.
Date Sun, 20 Sep 2015 06:30:16 GMT
Update the Intellij IDEA plugin to support marking directories as generated.


Project: http://git-wip-us.apache.org/repos/asf/buildr/repo
Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/f5866ded
Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/f5866ded
Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/f5866ded

Branch: refs/heads/master
Commit: f5866dedda96de3e8eee0cf84dea9cfd8ca1c6e7
Parents: 6ed1b36
Author: Peter Donald <peter@realityforge.org>
Authored: Sun Sep 20 16:23:01 2015 +1000
Committer: Peter Donald <peter@realityforge.org>
Committed: Sun Sep 20 16:23:01 2015 +1000

----------------------------------------------------------------------
 CHANGELOG              |  1 +
 lib/buildr/ide/idea.rb | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/buildr/blob/f5866ded/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 487f23a..08c68a8 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,5 @@
 1.4.24 (Pending)
+* Change: Update the Intellij IDEA plugin to support marking directories as generated.
 * Change: Update the Intellij IDEA plugin to correctly identify project paths as resource
           directories.
 * Change: Update the default GWT version used in the GWT addon to the latest release 2.7.0.

http://git-wip-us.apache.org/repos/asf/buildr/blob/f5866ded/lib/buildr/ide/idea.rb
----------------------------------------------------------------------
diff --git a/lib/buildr/ide/idea.rb b/lib/buildr/ide/idea.rb
index 7b5489e..671eea4 100644
--- a/lib/buildr/ide/idea.rb
+++ b/lib/buildr/ide/idea.rb
@@ -220,6 +220,14 @@ module Buildr #:nodoc:
         @main_resource_directories ||= [buildr_project.resources.sources].flatten.compact
       end
 
+      def main_generated_source_directories
+        @main_generated_source_directories ||= []
+      end
+
+      def main_generated_resource_directories
+        @main_generated_resource_directories ||= []
+      end
+
       def test_source_directories
         @test_source_directories ||= [buildr_project.test.compile.sources].flatten.compact
       end
@@ -228,6 +236,14 @@ module Buildr #:nodoc:
         @test_resource_directories ||= [buildr_project.test.resources.sources].flatten.compact
       end
 
+      def test_generated_source_directories
+        @test_generated_source_directories ||= []
+      end
+
+      def test_generated_resource_directories
+        @test_generated_resource_directories ||= []
+      end
+
       def excluded_directories
         @excluded_directories ||= [
           buildr_project.resources.target,
@@ -587,9 +603,13 @@ module Buildr #:nodoc:
           # Source folders
           [
             {:dirs => self.main_source_directories},
+            {:dirs => self.main_generated_source_directories, :generated => true},
             {:type => 'resource', :dirs => self.main_resource_directories},
+            {:type => 'resource', :dirs => self.main_generated_resource_directories,
:generated => true},
             {:test => true, :dirs => self.test_source_directories},
+            {:test => true, :dirs => self.test_generated_source_directories, :generated
=> true},
             {:test => true, :type => 'resource', :dirs => self.test_resource_directories},
+            {:test => true, :type => 'resource', :dirs => self.test_generated_resource_directories,
:generated => true},
           ].each do |content|
             content[:dirs].map { |dir| dir.to_s }.compact.sort.uniq.each do |dir|
               options = {}
@@ -597,6 +617,7 @@ module Buildr #:nodoc:
               options[:isTestSource] = (content[:test] ? 'true' : 'false') if content[:type]
!= 'resource'
               options[:type] = 'java-resource' if content[:type] == 'resource' &&
!content[:test]
               options[:type] = 'java-test-resource' if content[:type] == 'resource' &&
!content[:test]
+              options[:generated] = 'true' if content[:generated]
               xml.sourceFolder options
             end
           end


Mime
View raw message