Removed closure-compiler.jar from repository and js_test_libs.
Added closure-compiler.jar to third-party dependencies. Switch to use closure-compiler ant task instead of java task.
This commit is contained in:
Generated
-1
@@ -1,7 +1,6 @@
|
||||
<component name="libraryTable">
|
||||
<library name="js-test-libs">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/js/js.tests/testLib/closure-compiler.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/js/js.tests/testLib/rhino-1.7R4.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
|
||||
@@ -24,20 +24,22 @@
|
||||
|
||||
<property name="external.annotations.path" value="${basedir}/annotations"/>
|
||||
|
||||
<property name="dependencies.dir" value="${basedir}/dependencies" />
|
||||
|
||||
<path id="classpath">
|
||||
<file file="${bootstrap.runtime}"/>
|
||||
<fileset dir="${idea.sdk}" includes="core/*.jar"/>
|
||||
<fileset dir="${idea.sdk}" includes="lib/protobuf-2.5.0.jar"/>
|
||||
|
||||
<fileset dir="${basedir}/lib" includes="**/*.jar"/>
|
||||
<fileset dir="${basedir}/dependencies" includes="jline.jar"/>
|
||||
<fileset dir="${basedir}/dependencies" includes="jansi.jar"/>
|
||||
<fileset dir="${basedir}/dependencies" includes="cli-parser-1.1.1.jar"/>
|
||||
<fileset dir="${dependencies.dir}" includes="jline.jar"/>
|
||||
<fileset dir="${dependencies.dir}" includes="jansi.jar"/>
|
||||
<fileset dir="${dependencies.dir}" includes="cli-parser-1.1.1.jar"/>
|
||||
<fileset dir="${basedir}/js/js.translator/lib" includes="*.jar"/>
|
||||
</path>
|
||||
|
||||
<typedef resource="org/jetbrains/jet/buildtools/ant/antlib.xml" classpath="${bootstrap.compiler.home}/lib/kotlin-ant.jar"/>
|
||||
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${basedir}/dependencies/ant-contrib.jar"/>
|
||||
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${dependencies.dir}/ant-contrib.jar"/>
|
||||
|
||||
<taskdef name="javac2" classname="org.apache.tools.ant.taskdefs.Javac"/>
|
||||
<if>
|
||||
@@ -219,25 +221,26 @@
|
||||
<attribute name="Implementation-Version" value="${build.number}"/>
|
||||
</manifest>
|
||||
</jar>
|
||||
<java classname="com.google.javascript.jscomp.CommandLineRunner" failonerror="true">
|
||||
<classpath>
|
||||
<pathelement location="${basedir}\js\js.tests\testLib\closure-compiler.jar"/>
|
||||
</classpath>
|
||||
<arg value="--formatting"/>
|
||||
<arg value="PRETTY_PRINT"/>
|
||||
<arg value="--language_in"/>
|
||||
<arg value="ECMASCRIPT5_STRICT"/>
|
||||
<arg value="--compilation_level"/>
|
||||
<arg value="SIMPLE_OPTIMIZATIONS"/>
|
||||
<arg value="--js"/>
|
||||
<arg value="${basedir}/js/js.translator/testFiles/kotlin_lib_ecma5.js"/>
|
||||
<arg value="--js"/>
|
||||
<arg value="${basedir}/js/js.translator/testFiles/kotlin_lib.js"/>
|
||||
<arg value="--js"/>
|
||||
<arg value="${basedir}/js/js.translator/testFiles/maps.js"/>
|
||||
<arg value="--js_output_file"/>
|
||||
<arg value="${kotlin-home}/lib/kotlin.js"/>
|
||||
</java>
|
||||
|
||||
<taskdef name="closure-compiler"
|
||||
classname="com.google.javascript.jscomp.ant.CompileTask"
|
||||
classpath="${dependencies.dir}/closure-compiler.jar" />
|
||||
|
||||
<closure-compiler
|
||||
compilationLevel="simple"
|
||||
prettyprint="true"
|
||||
languagein="ECMASCRIPT5_STRICT"
|
||||
warning="verbose"
|
||||
debug="false"
|
||||
output="${kotlin-home}/lib/kotlin.js" >
|
||||
|
||||
<sources dir="${basedir}/js/js.translator/testFiles">
|
||||
<file name="kotlin_lib_ecma5.js"/>
|
||||
<file name="kotlin_lib.js"/>
|
||||
<file name="maps.js"/>
|
||||
</sources>
|
||||
|
||||
</closure-compiler>
|
||||
</target>
|
||||
|
||||
<target name="preloader">
|
||||
@@ -277,8 +280,8 @@
|
||||
<zipgroupfileset dir="${basedir}/ideaSDK/lib" includes="oromatcher.jar"/>
|
||||
<zipgroupfileset dir="${basedir}/ideaSDK/lib" includes="protobuf-2.5.0.jar"/>
|
||||
<zipgroupfileset dir="${basedir}/js/js.translator/lib" includes="*.jar"/>
|
||||
<zipgroupfileset dir="${basedir}/dependencies" includes="jline.jar"/>
|
||||
<zipgroupfileset dir="${basedir}/dependencies" includes="cli-parser-1.1.1.jar"/>
|
||||
<zipgroupfileset dir="${dependencies.dir}" includes="jline.jar"/>
|
||||
<zipgroupfileset dir="${dependencies.dir}" includes="cli-parser-1.1.1.jar"/>
|
||||
|
||||
<manifest>
|
||||
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
|
||||
@@ -308,7 +311,7 @@
|
||||
</target>
|
||||
|
||||
<target name="compiler">
|
||||
<taskdef resource="proguard/ant/task.properties" classpath="${basedir}/dependencies/proguard.jar"/>
|
||||
<taskdef resource="proguard/ant/task.properties" classpath="${dependencies.dir}/proguard.jar"/>
|
||||
|
||||
<cleandir dir="${output}/classes/compiler"/>
|
||||
|
||||
@@ -449,7 +452,7 @@
|
||||
<classpath>
|
||||
<fileset dir="${kotlin-home}/lib" includes="kotlin-compiler.jar"/>
|
||||
<file file="${bootstrap.runtime}"/>
|
||||
<fileset dir="${basedir}/dependencies/ant-1.7/lib" includes="ant.jar"/>
|
||||
<fileset dir="${dependencies.dir}/ant-1.7/lib" includes="ant.jar"/>
|
||||
</classpath>
|
||||
</javac2>
|
||||
|
||||
@@ -577,7 +580,7 @@
|
||||
</target>
|
||||
|
||||
<target name="j2kConverter">
|
||||
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${basedir}/dependencies/ant-contrib.jar"/>
|
||||
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${dependencies.dir}/ant-contrib.jar"/>
|
||||
|
||||
<cleandir dir="${output}/classes/j2k"/>
|
||||
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
|
||||
package org.jetbrains.k2js.test.config;
|
||||
|
||||
import closurecompiler.internal.com.google.common.collect.Lists;
|
||||
import closurecompiler.internal.com.google.common.collect.Maps;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import junit.framework.Assert;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
@@ -32,11 +31,11 @@ import java.util.Map;
|
||||
public class JsUnitTestReporter {
|
||||
|
||||
@NotNull
|
||||
private final Map<String, Boolean> finishedTests = Maps.newHashMap();
|
||||
private final Map<String, Boolean> finishedTests = ContainerUtil.newHashMap();
|
||||
@NotNull
|
||||
private final Map<String, List<String>> errors = Maps.newHashMap();
|
||||
private final Map<String, List<String>> errors = ContainerUtil.newHashMap();
|
||||
@NotNull
|
||||
private final List<String> processedTests = Lists.newArrayList();
|
||||
private final List<String> processedTests = ContainerUtil.newArrayList();
|
||||
|
||||
@Nullable
|
||||
private String currentTestName;
|
||||
@@ -69,7 +68,7 @@ public class JsUnitTestReporter {
|
||||
public void reportError(@NotNull String message) {
|
||||
List<String> errorList = errors.get(currentTestName);
|
||||
if (errorList == null) {
|
||||
errors.put(currentTestName, Lists.newArrayList(message));
|
||||
errors.put(currentTestName, ContainerUtil.newArrayList(message));
|
||||
}
|
||||
else {
|
||||
errorList.add(message);
|
||||
@@ -78,7 +77,7 @@ public class JsUnitTestReporter {
|
||||
|
||||
@NotNull
|
||||
private Collection<String> getNewFinishedTests() {
|
||||
ArrayList<String> finishedTests = Lists.newArrayList(this.finishedTests.keySet());
|
||||
ArrayList<String> finishedTests = ContainerUtil.newArrayList(this.finishedTests.keySet());
|
||||
finishedTests.removeAll(processedTests);
|
||||
return finishedTests;
|
||||
}
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
|
||||
package org.jetbrains.k2js.test.rhino;
|
||||
|
||||
import closurecompiler.internal.com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.k2js.config.EcmaVersion;
|
||||
@@ -43,7 +43,7 @@ public final class RhinoUtils {
|
||||
private static final NativeObject JSHINT_OPTIONS = new NativeObject();
|
||||
|
||||
@NotNull
|
||||
private static final Map<EcmaVersion, ScriptableObject> versionToScope = Maps.newHashMap();
|
||||
private static final Map<EcmaVersion, ScriptableObject> versionToScope = ContainerUtil.newHashMap();
|
||||
|
||||
static {
|
||||
// don't read JS, use kotlin and idea debugger ;)
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import closurecompiler.internal.com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.k2js.config.EcmaVersion;
|
||||
import org.jetbrains.k2js.test.rhino.CompositeRhinoResultsChecker;
|
||||
import org.jetbrains.k2js.test.rhino.RhinoFunctionResultChecker;
|
||||
@@ -38,7 +38,7 @@ public class StdLibJsArrayScriptTest extends StdLibTestBase {
|
||||
|
||||
@Override
|
||||
protected void performChecksOnGeneratedJavaScript(String path, EcmaVersion version) throws Exception {
|
||||
Map<String, Object> variables = Maps.newHashMap();
|
||||
Map<String, Object> variables = ContainerUtil.newHashMap();
|
||||
String moduleId = moduleIdFromOutputFile(path);
|
||||
RhinoResultChecker checker = new CompositeRhinoResultsChecker(
|
||||
new RhinoFunctionResultChecker(moduleId, "jstest", "testSize", 3.0),
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
*/
|
||||
package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import closurecompiler.internal.com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.jetbrains.k2js.config.EcmaVersion;
|
||||
import org.jetbrains.k2js.test.rhino.RhinoQUnitResultChecker;
|
||||
import org.jetbrains.k2js.test.rhino.RhinoResultChecker;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.jetbrains.k2js.test.rhino.RhinoUtils.runRhinoTest;
|
||||
@@ -38,7 +38,7 @@ public abstract class StdLibQUnitTestSupport extends StdLibTestBase {
|
||||
}
|
||||
|
||||
protected void runQUnitTestCase(String path, EcmaVersion version) throws Exception {
|
||||
runQUnitTestCase(path, version, Maps.<String, Object>newHashMap());
|
||||
runQUnitTestCase(path, version, new HashMap<String, Object>());
|
||||
}
|
||||
|
||||
protected void runQUnitTestCase(String path, EcmaVersion version, Map<String, Object> variables) throws Exception {
|
||||
|
||||
@@ -19,9 +19,9 @@ package org.jetbrains.k2js.test.utils;
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.k2js.config.Config;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
public final class LibraryFilePathsUtil {
|
||||
|
||||
@@ -70,7 +70,7 @@ public final class TranslationUtils {
|
||||
List<JetFile> allLibFiles = getAllLibFiles(project);
|
||||
Predicate<PsiFile> filesWithCode = new Predicate<PsiFile>() {
|
||||
@Override
|
||||
public boolean apply(@javax.annotation.Nullable PsiFile file) {
|
||||
public boolean apply(@Nullable PsiFile file) {
|
||||
assert file != null;
|
||||
return isFileWithCode((JetFile) file);
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -171,6 +171,19 @@
|
||||
<!-- CLI Parser -->
|
||||
<get-maven-library prefix="com/github/spullara/cli-parser" lib="cli-parser" version="1.1.1"/>
|
||||
|
||||
<!-- Closure Compiler -->
|
||||
<!-- A download url taken from http://code.google.com/p/closure-compiler/wiki/BinaryDownloads -->
|
||||
<get src="http://dl.google.com/closure-compiler/compiler-20131014.zip"
|
||||
dest="dependencies/download/closure-compiler.zip" usetimestamp="true"/>
|
||||
|
||||
<delete file="dependencies/closure-compiler.jar" failonerror="false"/>
|
||||
<unzip src="dependencies/download/closure-compiler.zip" dest="dependencies">
|
||||
<patternset>
|
||||
<include name="compiler.jar"/>
|
||||
</patternset>
|
||||
<mapper type="merge" to="closure-compiler.jar"/>
|
||||
</unzip>
|
||||
|
||||
<!-- Bootstrap compiler -->
|
||||
<get src="http://teamcity.jetbrains.com/guestAuth/repository/download/bt345/bootstrap.tcbuildtag/kotlin-plugin-{build.number}.zip"
|
||||
dest="dependencies/download/bootstrap-compiler.zip" usetimestamp="true"/>
|
||||
|
||||
Reference in New Issue
Block a user