Permalink
Browse files

Merge branch 'develop'

  • Loading branch information...
2 parents a622252 + 9ad4a7f commit 2fa0a9ad77e9a1d0792fba34eafbdd0a15142ae8 @SlevinBE SlevinBE committed Jun 8, 2012
Showing with 5,145 additions and 349 deletions.
  1. +6 −1 .gitignore
  2. +18 −0 CHANGELOG.textile
  3. +12 −20 README.textile
  4. +53 −39 build.gradle
  5. +2 −2 buildSrc/wrapper/gradle.properties
  6. +6 −0 gradle.properties
  7. 0 gradlew
  8. +32 −3 src/main/groovy/org/gradlefx/FlexType.groovy
  9. +71 −0 src/main/groovy/org/gradlefx/FrameworkLinkage.groovy
  10. +6 −0 src/main/groovy/org/gradlefx/configuration/FlexAntTasksConfigurator.groovy
  11. +3 −10 src/main/groovy/org/gradlefx/configuration/FlexUnitAntTasksConfigurator.groovy
  12. +39 −21 src/main/groovy/org/gradlefx/conventions/GradleFxConvention.groovy
  13. +218 −0 src/main/groovy/org/gradlefx/conventions/GradleFxDerivedProperties.groovy
  14. +37 −0 src/main/groovy/org/gradlefx/ide/plugins/FDTPlugin.groovy
  15. +40 −0 src/main/groovy/org/gradlefx/ide/plugins/FlashBuilderPlugin.groovy
  16. +36 −0 src/main/groovy/org/gradlefx/ide/plugins/FlashDevelopPlugin.groovy
  17. +36 −0 src/main/groovy/org/gradlefx/ide/plugins/FlexBuilderPlugin.groovy
  18. +34 −0 src/main/groovy/org/gradlefx/ide/plugins/IDEPlugin.groovy
  19. +36 −0 src/main/groovy/org/gradlefx/ide/plugins/IdeaPlugin.groovy
  20. +113 −0 src/main/groovy/org/gradlefx/ide/tasks/AbstractIDEProject.groovy
  21. +27 −0 src/main/groovy/org/gradlefx/ide/tasks/CleanTask.groovy
  22. +37 −0 src/main/groovy/org/gradlefx/ide/tasks/FDTProject.groovy
  23. +71 −0 src/main/groovy/org/gradlefx/ide/tasks/FlashBuilderClean.groovy
  24. +330 −0 src/main/groovy/org/gradlefx/ide/tasks/FlashBuilderProject.groovy
  25. +25 −0 src/main/groovy/org/gradlefx/ide/tasks/FlashBuilderUtil.groovy
  26. +37 −0 src/main/groovy/org/gradlefx/ide/tasks/FlashDevelopProject.groovy
  27. +37 −0 src/main/groovy/org/gradlefx/ide/tasks/FlexBuilderProject.groovy
  28. +37 −0 src/main/groovy/org/gradlefx/ide/tasks/IdeaProject.groovy
  29. +27 −0 src/main/groovy/org/gradlefx/ide/tasks/ProjectTask.groovy
  30. +47 −0 src/main/groovy/org/gradlefx/options/CompilerOption.groovy
  31. +61 −0 src/main/groovy/org/gradlefx/plugins/AbstractGradleFxPlugin.groovy
  32. +40 −62 src/main/groovy/org/gradlefx/{ → plugins}/GradleFxPlugin.groovy
  33. +138 −0 src/main/groovy/org/gradlefx/tasks/ASDoc.groovy
  34. +15 −7 src/main/groovy/org/gradlefx/tasks/AirPackage.groovy
  35. +6 −1 src/main/groovy/org/gradlefx/tasks/CopyResources.groovy
  36. +17 −12 src/main/groovy/org/gradlefx/tasks/HtmlWrapper.groovy
  37. +8 −3 src/main/groovy/org/gradlefx/tasks/Publish.groovy
  38. +1 −2 src/main/groovy/org/gradlefx/tasks/Tasks.groovy
  39. +102 −23 src/main/groovy/org/gradlefx/tasks/Test.groovy
  40. +59 −10 src/main/groovy/org/gradlefx/tasks/compile/AbstractCompileTask.groovy
  41. +12 −5 src/main/groovy/org/gradlefx/tasks/compile/AbstractMxmlc.groovy
  42. +13 −3 src/main/groovy/org/gradlefx/tasks/compile/Amxmlc.groovy
  43. +51 −25 src/main/groovy/org/gradlefx/tasks/compile/Compc.groovy
  44. +52 −7 src/main/groovy/org/gradlefx/tasks/compile/Mxmlc.groovy
  45. +0 −81 src/main/groovy/org/gradlefx/tasks/compile/TestCompile.groovy
  46. +6 −11 src/main/groovy/org/gradlefx/tasks/compile/factory/CompileTaskClassFactoryImpl.groovy
  47. +30 −0 src/main/groovy/org/gradlefx/templates/plugins/CreatorPlugin.groovy
  48. +30 −0 src/main/groovy/org/gradlefx/templates/plugins/ScaffoldPlugin.groovy
  49. +31 −0 src/main/groovy/org/gradlefx/templates/plugins/TemplatesPlugin.groovy
  50. +117 −0 src/main/groovy/org/gradlefx/templates/tasks/Scaffold.groovy
  51. +75 −0 src/main/groovy/org/gradlefx/util/TemplateUtil.groovy
  52. +36 −0 src/main/groovy/org/gradlefx/validators/AbstractCompilerPropertiesValidator.groovy
  53. +58 −0 src/main/groovy/org/gradlefx/validators/AbstractProjectPropertyValidator.groovy
  54. +36 −0 src/main/groovy/org/gradlefx/validators/AirPackagePropertiesValidator.groovy
  55. +54 −0 src/main/groovy/org/gradlefx/validators/CompcAdditionalPropertiesValidator.groovy
  56. +70 −0 src/main/groovy/org/gradlefx/validators/FlexSDKSpecifiedValidator.groovy
  57. +47 −0 src/main/groovy/org/gradlefx/validators/FrameworkLinkageValidator.groovy
  58. +61 −0 src/main/groovy/org/gradlefx/validators/MxmlcAdditionalPropertiesValidator.groovy
  59. +34 −0 src/main/groovy/org/gradlefx/validators/ProjectPropertyValidator.groovy
  60. +35 −0 src/main/groovy/org/gradlefx/validators/actions/ValidateAirPackageTaskPropertiesAction.groovy
  61. +35 −0 src/main/groovy/org/gradlefx/validators/actions/ValidateCompcTaskPropertiesAction.groovy
  62. +35 −0 src/main/groovy/org/gradlefx/validators/actions/ValidateMxmlcTaskPropertiesAction.groovy
  63. +58 −0 src/main/groovy/org/gradlefx/validators/runner/FailOnErrorValidatorRunner.groovy
  64. +22 −0 src/main/groovy/org/gradlefx/validators/runner/ValidatorRunner.groovy
  65. +1 −0 src/main/resources/META-INF/gradle-plugins/creator.properties
  66. +1 −0 src/main/resources/META-INF/gradle-plugins/fdt.properties
  67. +1 −0 src/main/resources/META-INF/gradle-plugins/flashbuilder.properties
  68. +1 −0 src/main/resources/META-INF/gradle-plugins/flashdevelop.properties
  69. +1 −0 src/main/resources/META-INF/gradle-plugins/flexbuilder.properties
  70. +1 −1 src/main/resources/META-INF/gradle-plugins/gradlefx.properties
  71. +1 −0 src/main/resources/META-INF/gradle-plugins/ide.properties
  72. +1 −0 src/main/resources/META-INF/gradle-plugins/ideafx.properties
  73. +1 −0 src/main/resources/META-INF/gradle-plugins/scaffold.properties
  74. +1 −0 src/main/resources/META-INF/gradle-plugins/templates.properties
  75. +232 −0 src/main/resources/templates/air-app.xml
  76. +14 −0 src/main/resources/templates/air.as
  77. +7 −0 src/main/resources/templates/air.mxml
  78. +80 −0 src/main/resources/templates/flashbuilder/air-as.actionScriptProperties
  79. +23 −0 src/main/resources/templates/flashbuilder/air-as.project
  80. +60 −0 src/main/resources/templates/flashbuilder/air-fx.actionScriptProperties
  81. +24 −0 src/main/resources/templates/flashbuilder/air-fx.project
  82. +116 −0 src/main/resources/templates/flashbuilder/mobile-as.actionScriptProperties
  83. +25 −0 src/main/resources/templates/flashbuilder/mobile-as.project
  84. +105 −0 src/main/resources/templates/flashbuilder/mobile-fx.actionScriptProperties
  85. +25 −0 src/main/resources/templates/flashbuilder/mobile-fx.project
  86. +66 −0 src/main/resources/templates/flashbuilder/swc-as.actionScriptProperties
  87. +18 −0 src/main/resources/templates/flashbuilder/swc-as.project
  88. +46 −0 src/main/resources/templates/flashbuilder/swc-fx.actionScriptProperties
  89. +18 −0 src/main/resources/templates/flashbuilder/swc-fx.project
  90. +65 −0 src/main/resources/templates/flashbuilder/swf-as.actionScriptProperties
  91. +17 −0 src/main/resources/templates/flashbuilder/swf-as.project
  92. +46 −0 src/main/resources/templates/flashbuilder/swf-fx.actionScriptProperties
  93. +18 −0 src/main/resources/templates/flashbuilder/swf-fx.project
  94. +6 −0 src/main/resources/templates/flashbuilder/template.flexLibProperties
  95. +2 −0 src/main/resources/templates/flashbuilder/template.flexProperties
  96. +268 −0 src/main/resources/templates/mobile-app.xml
  97. +20 −0 src/main/resources/templates/mobile.as
  98. +8 −0 src/main/resources/templates/mobile.mxml
  99. +14 −0 src/main/resources/templates/swf.as
  100. +7 −0 src/main/resources/templates/swf.mxml
  101. +52 −0 src/test/groovy/org/gradlefx/FlexTypeTest.groovy
  102. +244 −0 src/test/groovy/org/gradlefx/FrameworkLinkageTest.groovy
  103. +79 −0 src/test/groovy/org/gradlefx/conventions/GradleFxConventionTest.groovy
  104. +236 −0 src/test/groovy/org/gradlefx/conventions/GradleFxDerivedPropertiesTest.groovy
  105. +55 −0 src/test/groovy/org/gradlefx/validators/CompcAdditionalPropertiesValidatorTest.groovy
  106. +90 −0 src/test/groovy/org/gradlefx/validators/FlexSDKSpecifiedValidatorTest.groovy
  107. +127 −0 src/test/groovy/org/gradlefx/validators/FrameworkLinkageValidatorTest.groovy
  108. 0 src/test/resources/flex-sdk-no-config/frameworks/libs/some.swc
  109. 0 src/test/resources/flex-sdk-no-libs/frameworks/flex-config.xml
  110. 0 src/test/resources/invalid-flex-sdk/frameworks/libs/dummy.txt
  111. +4 −0 src/test/resources/valid-flex-sdk/ant/flexTasks.tasks
  112. BIN src/test/resources/valid-flex-sdk/ant/lib/flexTasks.jar
  113. 0 src/test/resources/valid-flex-sdk/frameworks/flex-config.xml
  114. 0 src/test/resources/valid-flex-sdk/frameworks/libs/some.swc
View
@@ -1,7 +1,12 @@
.gradle
.idea
+.settings
+.classpath
+bin
build
GradleFx.iml
+gradlefx.ipr
+gradlefx.iws
+/target
.orig
/.project
-gradle.properties
View
@@ -1,5 +1,23 @@
h2. GradleFx changelog
+h3. v0.5
+
+h5. New features
+* asdoc generation feature (+ 'fatSwc' convention property for fat swc generation)
+* added 'frameworkLinkage' property: defines how the Flex SDK will be linked. defaults to external for swc-based Flex projects, rsl for swf-based projects and none for pure actionscript projects
+* added the 'templates' plugin with a subplugin 'scaffold': generates project directory structure and main file. See documentation for more info: https://github.com/GradleFx/GradleFx/wiki/Templates-plugin
+* added the 'ide' plugin with a subplugin 'flashbuilder': allows you to generate the Adobe Flash Builder project files based on your build configuration. See documentation for more info: https://github.com/GradleFx/GradleFx/wiki/IDE-plugin
+
+h5. Improvements
+* Gradle 1.0 RC3 compatibility
+* Major rework of the FlexUnit integration (greatly simplified the required setup). See documentation for more information: https://github.com/GradleFx/GradleFx/wiki/Flexunit
+* 'mainClass' package notation is now also allowed (org.gradlefx.MainApp or org/gradlefx/MainApp.mxml)
+* Improved the error/warning/info messages
+
+h5. Bug fixes
+* Fixed issue 37: resources aren't added correctly to the swc
+* various other bug fixes
+
h3. v0.4.2
ATTENTION: Gradle 1.0 milestone 8 is required from now on.
View
@@ -6,24 +6,16 @@ All compiler arguments are supported. Some are automatically filled in by the pl
dependencies) and other more specific arguments can be provided to the plugin by adding them on the
additionalCompilerOptions convention property.
-It adds the following tasks:
-* compile
-* compileTest
-* package
-* test
-* createHtmlWrapper
-* build
-* publish
-* clean
-* copyresources
-
-The plugin has support for the following dependency scopes:
-* internal
-* external
-* merged
-* rsl
-* test
-* theme
+Features:
+* convention-over-configuration
+* dependency management
+* multi-project support
+* source file change detection
+* SWC, SWF and AIR project support
+* FlexUnit support
+* AsDoc support
+* Adobe Flash Builder project generation
+* project scaffolding
h2. Useful links
* Documentation: "https://github.com/GradleFx/GradleFx/wiki":https://github.com/GradleFx/GradleFx/wiki
@@ -33,6 +25,6 @@ h2. Useful links
* Changelog: "https://github.com/GradleFx/GradleFx/blob/master/CHANGELOG.textile":https://github.com/GradleFx/GradleFx/blob/master/CHANGELOG.textile
h2. Upcoming features
-* IDEA and Eclipse project generation support
-* AS3Doc generation
+* IDEA project generation support
* Mobile support
+* Automatic downloading of the Flex SDK
View
@@ -20,17 +20,20 @@ import org.gradle.api.artifacts.maven.MavenDeployment
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'signing'
+apply plugin: 'idea'
group = 'org.gradlefx'
-version = '0.4.2'
-packaging = 'jar'
+version = '0.5'
+ext.packaging = 'jar'
repositories {
mavenCentral()
}
dependencies {
compile gradleApi()
+ compile group: 'commons-lang', name: 'commons-lang', version: '2.6'
+ testCompile "org.spockframework:spock-core:0.6-groovy-1.8"
groovy group: 'org.codehaus.groovy', name: 'groovy', version: '1.8.6'
}
@@ -53,56 +56,67 @@ artifacts {
task wrapper(type: Wrapper) {
group = 'Buildmaster'
description = 'Generates gradlew and gradlew.bat bootstrap scripts'
- gradleVersion = '1.0-milestone-8'
+ gradleVersion = '1.0-rc-3'
// place jar file and properties into a subdirectory to avoid root dir clutter
jarFile = 'buildSrc/wrapper/gradle.jar'
}
//********* artifact signing *********
-signing {
- sign configurations.archives
+if(gradle.startParameter.taskNames.contains("uploadArchives")) {
+ signing {
+ sign configurations.archives
+ }
+} else {
+ task signArchives {
+ // do nothing
+ }
}
uploadArchives {
repositories {
- mavenDeployer {
- beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
-
- repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
- authentication(userName: sonatypeUsername, password: sonatypePassword)
- }
-
- pom.project {
- name 'GradleFx'
- packaging 'jar'
- description 'GradleFx is a Gradle plugin for building Flex and Actionscript applications'
- url 'http://gradlefx.github.com/'
-
- scm {
- url 'scm:git@github.com:GradleFx/GradleFx.git'
- connection 'scm:git@github.com:GradleFx/GradleFx.git'
- developerConnection 'scm:git@github.com:GradleFx/GradleFx.git'
- }
-
- licenses {
- license {
- name 'The Apache Software License, Version 2.0'
- url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
- distribution 'repo'
+ if (version.contains("SNAPSHOT")) {
+ mavenLocal()
+ }
+ else {
+ mavenDeployer {
+ beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
+
+ repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
+ authentication(userName: sonatypeUsername, password: sonatypePassword)
+ }
+
+ pom.project {
+ name 'GradleFx'
+ packaging 'jar'
+ description 'GradleFx is a Gradle plugin for building Flex and Actionscript applications'
+ url 'http://gradlefx.github.com/'
+
+ scm {
+ url 'scm:git@github.com:GradleFx/GradleFx.git'
+ connection 'scm:git@github.com:GradleFx/GradleFx.git'
+ developerConnection 'scm:git@github.com:GradleFx/GradleFx.git'
}
- }
-
- developers {
- developer {
- id 'yennicktrevels'
- name 'Yennick Trevels'
+
+ licenses {
+ license {
+ name 'The Apache Software License, Version 2.0'
+ url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
+ distribution 'repo'
+ }
}
- developer {
- id 'stevendick'
- name 'Steven Dick'
+
+ developers {
+ developer {
+ id 'yennicktrevels'
+ name 'Yennick Trevels'
+ }
+ developer {
+ id 'stevendick'
+ name 'Steven Dick'
+ }
}
}
- }
+ }
}
}
}
@@ -1,6 +1,6 @@
-#Wed Feb 29 22:59:37 CET 2012
+#Sat May 05 19:37:19 CEST 2012
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.0-milestone-8-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.0-rc-3-bin.zip
View
@@ -0,0 +1,6 @@
+signing.keyId=
+signing.password=
+signing.secretKeyRingFile=
+
+sonatypeUsername=
+sonatypePassword=
View
0 gradlew 100644 → 100755
No changes.
@@ -17,7 +17,36 @@
package org.gradlefx
enum FlexType {
- swf,
- swc,
- air
+ swf('flex'),
+ swc('flex'),
+ air('air'),
+ mobile('airmobile')
+
+ private String configName
+
+
+ public FlexType(String configName) {
+ this.configName = configName
+ }
+
+ public String getConfigName() {
+ return configName
+ }
+
+ public boolean isApp() {
+ return isWebApp() || isNativeApp()
+ }
+
+ public boolean isLib() {
+ return this == swc
+ }
+
+ public boolean isWebApp() {
+ return this == swf
+ }
+
+ public boolean isNativeApp() {
+ return this == air || this == mobile
+ }
+
}
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2011 the original author or authors
+ *
+ * Licensed 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.
+ */
+
+package org.gradlefx
+
+import org.gradlefx.options.CompilerOption;
+
+public enum FrameworkLinkage {
+ external(CompilerOption.EXTERNAL_LIBRARY_PATH),
+ rsl(CompilerOption.RUNTIME_SHARED_LIBRARY_PATH),
+ merged(CompilerOption.LIBRARY_PATH),
+ none
+
+ private CompilerOption compilerOption
+
+ private FrameworkLinkage() {}
+
+ private FrameworkLinkage(CompilerOption compilerOption) {
+ this.compilerOption = compilerOption;
+ }
+
+ public CompilerOption getCompilerOption() {
+ return compilerOption
+ }
+
+ public boolean usesFlex() {
+ return this != none
+ }
+
+ public boolean isCompilerDefault(FlexType type) {
+ FrameworkLinkage compilerDefault = getCompilerDefault(type)
+ return this == compilerDefault || (this == none && compilerDefault == merged)
+ }
+
+ public FrameworkLinkage getCompilerDefault(FlexType type) {
+ return getCompilerDefault(this, type)
+ }
+
+ /**
+ * The framework linkage defaults to 'RSL' for Flex application projects ('swf', 'air' or 'mobile' {@link FlexType}),
+ * 'merged' for pure ActionScript application projects
+ * and 'external' for library projects ('swc' {@link FlexType}).
+ *
+ * @return The default framework linkage
+ */
+ public static FrameworkLinkage getCompilerDefault(FrameworkLinkage linkage, FlexType type) {
+ if ((linkage == external && type.isApp()) || (linkage == rsl && type.isLib()))
+ throw new Exception('Applications cannot link externally')
+
+ return getCompilerDefault(linkage.usesFlex(), type)
+ }
+
+ public static FrameworkLinkage getCompilerDefault(boolean useFlex, FlexType type) {
+ if (type.isLib()) return external
+ return useFlex ? rsl : merged
+ }
+
+}
@@ -17,6 +17,8 @@
package org.gradlefx.configuration
import org.gradle.api.Project
+import org.gradlefx.validators.runner.FailOnErrorValidatorRunner
+import org.gradlefx.validators.FlexSDKSpecifiedValidator
class FlexAntTasksConfigurator {
@@ -27,6 +29,10 @@ class FlexAntTasksConfigurator {
}
public void configure() {
+ new FailOnErrorValidatorRunner(project)
+ .add(new FlexSDKSpecifiedValidator())
+ .run()
+
project.ant.property(name: 'FLEX_HOME', value: project.flexHome)
project.ant.property(name: 'FLEX_LIB', value: '${FLEX_HOME}/frameworks/libs')
project.ant.property(name: 'FLEX_ANT', value: '${FLEX_HOME}/ant')
@@ -19,22 +19,15 @@ package org.gradlefx.configuration
import org.gradle.api.Project
class FlexUnitAntTasksConfigurator {
-
+
private Project project
FlexUnitAntTasksConfigurator(Project project) {
this.project = project;
}
public void configure() {
- if (project.flexUnit.home == null) return
-
- project.ant.taskdef(resource: 'flexUnitTasks.tasks') {
- classpath {
- fileset(dir: project.flexUnit.home) {
- include(name: project.flexUnit.antTasksJar)
- }
- }
- }
+ project.ant.taskdef(resource: 'flexUnitTasks.tasks',
+ classpath: project.configurations.test.asPath)
}
}
Oops, something went wrong.

0 comments on commit 2fa0a9a

Please sign in to comment.