You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by do...@apache.org on 2012/12/03 12:30:51 UTC
svn commit: r1416456 - in /buildr/trunk: CHANGELOG
addon/buildr/top_level_generate_dir.rb
Author: donaldp
Date: Mon Dec 3 11:30:50 2012
New Revision: 1416456
URL: http://svn.apache.org/viewvc?rev=1416456&view=rev
Log:
Create a simple extension that modifies the project layout to place generated files at the top level.
Added:
buildr/trunk/addon/buildr/top_level_generate_dir.rb (with props)
Modified:
buildr/trunk/CHANGELOG
Modified: buildr/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=1416456&r1=1416455&r2=1416456&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Mon Dec 3 11:30:50 2012
@@ -1,5 +1,7 @@
1.4.10 (Pending)
-* Fixed: BUILDR-633 - Remove hardcoded shebang lines in all-in-one release.
+* Fixed: BUILDR-633 - Remove hardcoded shebang lines in all-in-one release.
+* Added: Create a simple extension that modifies the project layout to place
+ generated files at the top level.
1.4.9 (2012-11-08)
* Fixed: Fixed the interaction with the FileUtils classes. The last release
Added: buildr/trunk/addon/buildr/top_level_generate_dir.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/addon/buildr/top_level_generate_dir.rb?rev=1416456&view=auto
==============================================================================
--- buildr/trunk/addon/buildr/top_level_generate_dir.rb (added)
+++ buildr/trunk/addon/buildr/top_level_generate_dir.rb Mon Dec 3 11:30:50 2012
@@ -0,0 +1,37 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with this
+# work for additional information regarding copyright ownership. The ASF
+# licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+module Buildr
+
+ # A simple extension that modifies the project layout to place generated files at the top level.
+ # Generated files are typically created below layout[:target, :generated], placing them at the top
+ # level makes it easy for IDEs to inspect source in the generated directory while ignoring the dir
+ # containing the intermediate artifacts.
+ #
+ module TopLevelGenerateDir
+ module ProjectExtension
+ include Extension
+
+ before_define do |project|
+ project.layout[:target, :generated] = "generated"
+ project.clean { rm_rf project._(:target, :generated) }
+ end
+ end
+ end
+end
+
+class Buildr::Project
+ include Buildr::TopLevelGenerateDir::ProjectExtension
+end
\ No newline at end of file
Propchange: buildr/trunk/addon/buildr/top_level_generate_dir.rb
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: buildr/trunk/addon/buildr/top_level_generate_dir.rb
------------------------------------------------------------------------------
svn:mime-type = text/x-ruby