changeset 4251:e03ba4c71157

Fixed DRT creation
author peterz
date Wed, 10 Jul 2013 19:03:23 +0400
parents b5d3f276d44b
children dd95335161a0
files build.gradle modules/web/src/main/native/Tools/Scripts/old-run-webkit-tests
diffstat 2 files changed, 24 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/build.gradle	Wed Jul 10 12:22:38 2013 +0300
+++ b/build.gradle	Wed Jul 10 19:03:23 2013 +0400
@@ -1950,8 +1950,7 @@
                 "../media/build/classes/main",
                 "$jfxTopDir/media/jfxmedia/dist/jfxmedia.jar")
     }
-    compileJava.exclude "com/sun/javafx/webkit/drt/**/*"
-
+    
     test {
         classpath += files("../../../artifacts/sdk/rt/lib/ext/jfxrt.jar")
         doFirst {
@@ -2083,12 +2082,17 @@
                 commandLine("perl", "Tools/Scripts/build-webkit", "--java", "--imageio")
             }
             copy {
-                /// Reuse the library lambda here
                 from "$webkitOutputDir/lib/libjfxwebkit.so"
                 from "$webkitOutputDir/lib/libjfxwebkit.dylib"
                 from "$webkitOutputDir/lib/jfxwebkit.dll"
                 into "build/libs"
             }
+            copy {
+                from "$webkitOutputDir/lib/libDumpRenderTreeJava.so"
+                from "$webkitOutputDir/lib/libDumpRenderTreeJava.dylib"
+                from "$webkitOutputDir/lib/DumpRenderTreeJava.dll"
+                into "build/test"
+            }
         }
     }
     
@@ -2113,10 +2117,19 @@
         }
     }
 
+    def drtClasses = "com/sun/javafx/webkit/drt/**"
+    jar.exclude(drtClasses)
+    task drtJar(type: Jar, dependsOn: compileJava) {
+        archiveName = "drt.jar"
+        destinationDir = file("$buildDir/test")
+        from "$buildDir/classes/main"
+        include drtClasses
+    }
+
     task copyClassesFromBinaryStub << {
         copy {
             from zipTree(BINARY_STUB.getSingleFile())
-            into "build/classes/main"
+            into "$buildDir/classes/main"
             include("javafx/scene/web/**",
                 "com/sun/javafx/scene/web/**",
                 "com/sun/webkit/**",
@@ -2126,8 +2139,12 @@
         }
     }
 
-    jar.dependsOn (COMPILE_WEBKIT ? compileGenerated : copyClassesFromBinaryStub)
-    
+    if (COMPILE_WEBKIT) {
+        jar.dependsOn compileGenerated, drtJar
+    } else {
+        jar.dependsOn copyClassesFromBinaryStub
+    }
+
     clean << {
         project.delete(
             "src/main/build",
--- a/modules/web/src/main/native/Tools/Scripts/old-run-webkit-tests	Wed Jul 10 12:22:38 2013 +0300
+++ b/modules/web/src/main/native/Tools/Scripts/old-run-webkit-tests	Wed Jul 10 19:03:23 2013 +0400
@@ -460,7 +460,7 @@
     my $javaHome = $ENV{'JAVA_HOME'};
     die "JAVA_HOME is undefined" if !defined($javaHome);
 
-    my $baseDir = "$productDir/../../../../../artifacts";
+    my $baseDir = "$productDir/../../../../../../../../artifacts";
     if (isCygwin()) {
         chomp($baseDir = `cygpath -m \"$baseDir\"`);
     }