You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cd...@apache.org on 2014/09/19 10:53:31 UTC
git commit: [flex-utilities] [refs/heads/develop] - Made the logic of
Air and FlashDownloader accessible from Flexmojos.
Repository: flex-utilities
Updated Branches:
refs/heads/develop fb72635b9 -> baf904c6e
Made the logic of Air and FlashDownloader accessible from Flexmojos.
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/baf904c6
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/baf904c6
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/baf904c6
Branch: refs/heads/develop
Commit: baf904c6ec0f42f303250a8f41f144c45374d8a4
Parents: fb72635
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Fri Sep 19 10:53:09 2014 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Fri Sep 19 10:53:24 2014 +0200
----------------------------------------------------------------------
.../utilities/converter/core/AirDownloader.java | 14 ++++++++-----
.../converter/core/FlashDownloader.java | 22 ++++++++++++--------
2 files changed, 22 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/baf904c6/mavenizer/core/src/main/java/org/apache/flex/utilities/converter/core/AirDownloader.java
----------------------------------------------------------------------
diff --git a/mavenizer/core/src/main/java/org/apache/flex/utilities/converter/core/AirDownloader.java b/mavenizer/core/src/main/java/org/apache/flex/utilities/converter/core/AirDownloader.java
index db1e7f4..6e2b9ce 100644
--- a/mavenizer/core/src/main/java/org/apache/flex/utilities/converter/core/AirDownloader.java
+++ b/mavenizer/core/src/main/java/org/apache/flex/utilities/converter/core/AirDownloader.java
@@ -28,6 +28,14 @@ import java.io.File;
*/
public class AirDownloader {
+ public void downloadAndConvert(File targetDirectory, String version, PlatformType platformType) throws Exception {
+ final DownloadRetriever downloadRetriever = new DownloadRetriever();
+ final File airSDKSourceDirectory = downloadRetriever.retrieve(SdkType.AIR, version, platformType);
+
+ final AirConverter airConverter = new AirConverter(airSDKSourceDirectory, targetDirectory);
+ airConverter.convert();
+ }
+
public static void main(String[] args) throws Exception {
if(args.length != 3) {
System.out.println("Usage: AirDownloader {air-version} {target-directory} {platform-type}");
@@ -41,11 +49,7 @@ public class AirDownloader {
throw new Exception("Unknown platform type: " + args[2]);
}
- final DownloadRetriever downloadRetriever = new DownloadRetriever();
- final File airSDKSourceDirectory = downloadRetriever.retrieve(SdkType.AIR, version, platformType);
-
- final AirConverter airConverter = new AirConverter(airSDKSourceDirectory, targetDirectory);
- airConverter.convert();
+ new AirDownloader().downloadAndConvert(targetDirectory, version, platformType);
}
}
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/baf904c6/mavenizer/core/src/main/java/org/apache/flex/utilities/converter/core/FlashDownloader.java
----------------------------------------------------------------------
diff --git a/mavenizer/core/src/main/java/org/apache/flex/utilities/converter/core/FlashDownloader.java b/mavenizer/core/src/main/java/org/apache/flex/utilities/converter/core/FlashDownloader.java
index a0e7976..b90a223 100644
--- a/mavenizer/core/src/main/java/org/apache/flex/utilities/converter/core/FlashDownloader.java
+++ b/mavenizer/core/src/main/java/org/apache/flex/utilities/converter/core/FlashDownloader.java
@@ -27,15 +27,7 @@ import java.io.File;
*/
public class FlashDownloader {
- public static void main(String[] args) throws Exception {
- if(args.length != 2) {
- System.out.println("Usage: FlashDownloader {player-version} {target-directory}");
- return;
- }
-
- final String version = args[0];
- final File targetDirectory = new File(args[1]);
-
+ public void downloadAndConvert(File targetDirectory, String version) throws Exception {
final DownloadRetriever downloadRetriever = new DownloadRetriever();
final File playerglobalSourceFile = downloadRetriever.retrieve(SdkType.FLASH, version);
@@ -58,4 +50,16 @@ public class FlashDownloader {
flashConverter.convert();
}
+ public static void main(String[] args) throws Exception {
+ if(args.length != 2) {
+ System.out.println("Usage: FlashDownloader {player-version} {target-directory}");
+ return;
+ }
+
+ final String version = args[0];
+ final File targetDirectory = new File(args[1]);
+
+ new FlashDownloader().downloadAndConvert(targetDirectory, version);
+ }
+
}