I can not build/create file .swc with Gradle


(Hung Bang) #1

My old project using Maven build. I build file swc with maven based on plugin flexmojos :

`
4.0.0

com.heb.enterprise.pm
pm-config
1.0
…/pm-config/pom.xml

autocomplete-1.2-Fx4
swc
autocomplete-1.2-Fx4
Autocomplete

<repositories>
	<repository>
		<id>flex-mojos-repository</id>
		<url>http://repository.sonatype.org/content/groups/flexgroup/</url>
	</repository>
	<repository>
		<id>cairngorm-repository</id>
		<url>http://opensource.adobe.com/svn/opensource/cairngorm3/maven-repository/</url>
	</repository>
</repositories>
<pluginRepositories>
	<pluginRepository>
		<id>flex-mojos-plugin-repository</id>
		<url>http://repository.sonatype.org/content/groups/flexgroup/</url>
	</pluginRepository>
	<pluginRepository>
		<id>cairngorm-plugin-repository</id>
		<url>http://opensource.adobe.com/svn/opensource/cairngorm3/maven-repository/</url>
	</pluginRepository>
</pluginRepositories>

<build>
	<sourceDirectory>src/</sourceDirectory>
	<finalName>${project.artifactId}-${pm.version}</finalName>
	<plugins>

		<plugin>
			<groupId>org.sonatype.flexmojos</groupId>
			<artifactId>flexmojos-maven-plugin</artifactId>
			<version>${flexmojos.version}</version>
			<extensions>true</extensions>

			<configuration>
				<configurationReport>true</configurationReport>
				<swfVersion>${swf.version}</swfVersion>
				<debug>${flex-debug}</debug>
			<optimize>${flex-optimize}</optimize>
			</configuration>
		</plugin>

	</plugins>
	<pluginManagement>
		<plugins>
			<!--This plugin's configuration is used to store Eclipse m2e settings 
				only. It has no influence on the Maven build itself. -->
			<plugin>
				<groupId>org.eclipse.m2e</groupId>
				<artifactId>lifecycle-mapping</artifactId>
				<version>1.0.0</version>
				<configuration>
					<lifecycleMappingMetadata>
						<pluginExecutions>
							<pluginExecution>
								<pluginExecutionFilter>
									<groupId>
										org.codehaus.mojo
									</groupId>
									<artifactId>
										build-helper-maven-plugin
									</artifactId>
									<versionRange>
										[1.7,)
									</versionRange>
									<goals>
										<goal>add-source</goal>
									</goals>
								</pluginExecutionFilter>
								<action>
									<ignore></ignore>
								</action>
							</pluginExecution>
							<pluginExecution>
								<pluginExecutionFilter>
									<groupId>
										org.sonatype.flexmojos
									</groupId>
									<artifactId>
										flexmojos-maven-plugin
									</artifactId>
									<versionRange>
										[4.2-beta,)
									</versionRange>
									<goals>
										<goal>compile-swf</goal>
										<goal>test-compile</goal>
										<goal>compile-swc</goal>
									</goals>
								</pluginExecutionFilter>
								<action>
									<ignore></ignore>
								</action>
							</pluginExecution>
						</pluginExecutions>
					</lifecycleMappingMetadata>
				</configuration>
			</plugin>
		</plugins>
	</pluginManagement>
</build>

<properties>  
	<sonar.language>flex</sonar.language>  
	<sonar.dynamicanalysis>false</sonar.dynamicanalysis>  
</properties>

<dependencies>

	<dependency>
		<groupId>com.adobe.flex.framework</groupId>
		<artifactId>airglobal</artifactId>
		<version>${flexsdk.version}</version>
		<type>pom</type>
	</dependency>

	<dependency>
		<groupId>com.adobe.flex.framework</groupId>
		<artifactId>playerglobal</artifactId>
		<version>${flexsdk.version}</version>
		<type>pom</type>
	</dependency>

	<dependency>
		<groupId>com.adobe.flex.framework</groupId>
		<artifactId>airframework</artifactId>
		<version>${flexsdk.version}</version>
		<type>pom</type>
	</dependency>

	<dependency>
		<groupId>com.adobe.flex.framework</groupId>
		<artifactId>air-framework</artifactId>
		<version>${flexsdk.version}</version>
		<type>pom</type>
	</dependency>

	<dependency>
		<groupId>com.adobe.flex.framework</groupId>
		<artifactId>flex-framework</artifactId>
		<version>${flexsdk.version}</version>
		<type>pom</type>

	</dependency>

	<dependency>
		<groupId>com.adobe.flex.framework</groupId>
		<artifactId>framework</artifactId>
		<version>${flexsdk.version}</version>
		<type>pom</type>
	</dependency>

	<dependency>
		<groupId>com.adobe.flex.framework</groupId>
		<artifactId>spark</artifactId>
		<version>${flexsdk.version}</version>
		<type>swc</type>
	</dependency>

	<dependency>
		<groupId>org.spicefactory</groupId>
		<artifactId>parsley-flex</artifactId>
		<version>${parsley.version}</version>
		<type>swc</type>
	</dependency>

	<dependency>
		<groupId>org.spicefactory</groupId>
		<artifactId>parsley-core</artifactId>
		<version>${parsley.version}</version>
		<type>swc</type>

	</dependency>

	<dependency>
		<groupId>org.spicefactory</groupId>
		<artifactId>legacy-parsley-commands</artifactId>
		<version>${parsley.command.version}</version>
		<type>swc</type>
	</dependency>

	<dependency>
		<groupId>org.spicefactory</groupId>
		<artifactId>spicelib-commands</artifactId>
		<version>${spicelib.command.version}</version>
		<type>swc</type>
	</dependency>

	<dependency>
		<groupId>org.spicefactory</groupId>
		<artifactId>spicelib-reflect</artifactId>
		<version>${spicelib.reflect.version}</version>
		<type>swc</type>
	</dependency>

	<dependency>
		<groupId>org.spicefactory</groupId>
		<artifactId>spicelib-util</artifactId>
		<version>${spicelib.util.version}</version>
		<type>swc</type>
	</dependency>

	<dependency>
		<groupId>com.caucho</groupId>
		<artifactId>hessian-flex</artifactId>
		<version>${hessian.flex.version}</version>
		<type>swc</type>
	</dependency>

</dependencies>

`

Please help me build file .swc in gradle. Thanks anyone !


(Psijic Void) #2

I’d like to know how convert flash project to gradle too.