Build debug SWF package and debug SWF production package

Hi

I’m extremly new to gradle so I’m looking for help in a problem that I have

I’m trying to create a webpage which will contain a media player, in order to do this I need to build a debug SWF package and production SWF package.

However when tring to gradle clean compile I get the following message

FAILURE: Build failed with an exception.

  • Where: Build file ‘/var/www/build.gradle’ line: 10

  • What went wrong: A problem occurred evaluating root project ‘www’. Cause: org.gradle.api.internal.file.BaseDirFileResolver

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 6.363 secs

=================================================

This is what I have in my build.gradle

buildscript {

repositories {

mavenCentral()

}

dependencies {

classpath group: ‘org.gradlefx’, name: ‘gradlefx’, version: ‘0.8.1’

} }

apply plugin: ‘gradlefx’ apply plugin: ‘flashbuilder’

type = ‘swf’ version = ‘1.0’ mainClass = ‘com/castlabs/dash/DashPlugin.as’

repositories {

ivy {

name ‘Apache’

artifactPattern ‘http://apache.cu.be/flex/[revision]/binaries/[module]-[revision]-bin.[ext]’

} }

dependencies {

flexSDK group: ‘org.apache’, name: ‘apache-flex-sdk’, version: ‘4.12.0’, ext: ‘tar.gz’ }

sdkAutoInstall {

showPrompts = false }

// if a profile isn’t defined, a debug is default if (!project.hasProperty(“profile”)) {

project.ext.profile = “debug” }

apply from: “${profile}-profile.gradle”

task copySwfToDemo(type: Copy) {

mustRunAfter compileFlex

from file(project.copyFrom)

into project.copyTo }

task compile {

dependsOn compileFlex

dependsOn copySwfToDemo }

=============================================

gradle info gives me the following:

alkhuhsm@dev-NW504:/var/www$ gradle --info Starting Build Settings evaluated using empty settings file. Projects loaded. Root project using build file ‘/var/www/build.gradle’. Included projects: [root project ‘www’] Evaluating root project ‘www’ using build file ‘/var/www/build.gradle’. :: loading settings :: url = jar:file:/usr/share/gradle/lib/ivy.jar!/org/apache/ivy/core/settings/ivysettings.xml :: resolving dependencies :: #www;unspecified

confs: [classpath]

found org.gradlefx#gradlefx;0.8.1 in MavenRepo

found org.codehaus.groovy#groovy-all;1.8.6 in MavenRepo

found commons-lang#commons-lang;2.6 in MavenRepo

found commons-io#commons-io;2.4 in MavenRepo :: resolution report :: resolve 314ms :: artifacts dl 0ms


|

|

modules

||

artifacts

|

|

conf

| number| search|dwnlded|evicted|| number|dwnlded|


|

classpath

|

4

|

0

|

0

|

0

||

0

|

0

|


=========================================================================

I’m using Gradle 1.0-milestone-3 Also have

Groovy: 1.8.6 Ant: Apache Ant™ version 1.8.2 compiled on December 3 2011 Ivy: non official version JVM: 1.6.0_31 (Sun Microsystems Inc. 23.25-b01) OS: Linux 3.2.0-67-generic-pae i386

Any ideas on how to sort this out will be very much appriciated

The --stacktrace showed the following exceptions

Exception is: org.gradle.api.GradleScriptException: A problem occurred evaluating root project ‘www’.

at org.gradle.groovy.scripts.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:51)

at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:127)

at org.gradle.configuration.BuildScriptProcessor.evaluate(BuildScriptProcessor.java:38)

at org.gradle.configuration.DefaultProjectEvaluator.evaluate(DefaultProjectEvaluator.java:38)

at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:487)

at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:71)

at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:23)

at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:21)

at org.gradle.configuration.DefaultBuildConfigurer$1.execute(DefaultBuildConfigurer.java:38)

at org.gradle.configuration.DefaultBuildConfigurer$1.execute(DefaultBuildConfigurer.java:35)

at org.gradle.api.internal.project.AbstractProject.configure(AbstractProject.java:463)

at org.gradle.api.internal.project.AbstractProject.allprojects(AbstractProject.java:458)

at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35)

at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:141)

at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:112)

at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:80)

at org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:41)

at org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:27)

at org.gradle.launcher.ExceptionReportingAction.execute(ExceptionReportingAction.java:32)

at org.gradle.launcher.ExceptionReportingAction.execute(ExceptionReportingAction.java:21)

at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:219)

at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:203)

at org.gradle.launcher.Main.execute(Main.java:55)

at org.gradle.launcher.Main.main(Main.java:40)

at org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:46)

at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:28)

at org.gradle.launcher.GradleMain.main(GradleMain.java:24) Caused by: java.lang.NoClassDefFoundError: org.gradle.api.internal.file.BaseDirFileResolver

at org.gradlefx.conventions.GradleFxConvention.class$(GradleFxConvention.groovy)

at org.gradlefx.conventions.GradleFxConvention.$get$$class$org$gradle$api$internal$file$BaseDirFileResolver(GradleFxConvention.groovy)

at org.gradlefx.conventions.GradleFxConvention.(GradleFxConvention.groovy:129)

at org.gradlefx.plugins.AbstractGradleFxPlugin.apply(AbstractGradleFxPlugin.groovy:41)

at org.gradlefx.plugins.AbstractGradleFxPlugin.apply(AbstractGradleFxPlugin.groovy)

at org.gradle.api.internal.plugins.DefaultProjectsPluginContainer.providePlugin(DefaultProjectsPluginContainer.java:103)

at org.gradle.api.internal.plugins.DefaultProjectsPluginContainer.addPluginInternal(DefaultProjectsPluginContainer.java:67)

at org.gradle.api.internal.plugins.DefaultProjectsPluginContainer.apply(DefaultProjectsPluginContainer.java:37)

at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyPlugin(DefaultObjectConfigurationAction.java:101)

at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.access$200(DefaultObjectConfigurationAction.java:32)

at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$3.run(DefaultObjectConfigurationAction.java:72)

at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.java:114)

at org.gradle.api.internal.project.AbstractProject.apply(AbstractProject.java:854)

at org.gradle.api.Project$apply.call(Unknown Source)

at org.gradle.api.internal.project.ProjectScript.apply(ProjectScript.groovy:35)

at org.gradle.api.Script$apply.callCurrent(Unknown Source)

at build_7v0g3m1nb0s268jotaj2fjpnb8.run(/var/www/build.gradle:10)

at org.gradle.groovy.scripts.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:49)

… 26 more

BUILD FAILED