blob: d18b05e8f6f0866a70ae3c16cee01cbbd914337b [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.royale.typedefs</groupId>
<artifactId>royale-typedefs-parent</artifactId>
<version>0.9.6</version>
</parent>
<artifactId>royale-typedefs-js</artifactId>
<version>0.9.6</version>
<packaging>swc</packaging>
<name>Apache Royale: TypeDefs: JS</name>
<build>
<sourceDirectory>src/main/royale</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.royale.compiler</groupId>
<artifactId>compiler-build-tools</artifactId>
<version>${royale.build-tools.version}</version>
<executions>
<execution>
<id>unpack-closure-externs</id>
<phase>validate</phase>
<goals>
<goal>unpack-resources</goal>
</goals>
<configuration>
<resource>externs.zip</resource>
</configuration>
</execution>
</executions>
<!--
Dependency to the closure compiler externs artifact so
the "unpack-resources" goal can find the externs.zip
-->
<dependencies>
<dependency>
<groupId>com.google.javascript</groupId>
<artifactId>closure-compiler-externs</artifactId>
<version>v20181210</version>
</dependency>
</dependencies>
</plugin>
<!-- Download JavaScript from GitHub -->
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>get-svg</id>
<phase>validate</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/contrib/externs/svg.js</url>
<outputFileName>svg.js</outputFileName>
<outputDirectory>${project.build.directory}/downloads</outputDirectory>
<skipCache>true</skipCache>
</configuration>
</execution>
<execution>
<id>get-es3</id>
<phase>validate</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/es3.js</url>
<outputFileName>es3.js</outputFileName>
<outputDirectory>${project.build.directory}/downloads</outputDirectory>
<skipCache>true</skipCache>
<overwrite>true</overwrite>
</configuration>
</execution>
<execution>
<id>get-es6</id>
<phase>validate</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/es6.js</url>
<outputFileName>es6.js</outputFileName>
<outputDirectory>${project.build.directory}/downloads</outputDirectory>
<skipCache>true</skipCache>
<overwrite>true</overwrite>
</configuration>
</execution>
<execution>
<id>get-w3c_composition_event</id>
<phase>validate</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/w3c_composition_event.js</url>
<outputFileName>w3c_composition_event.js</outputFileName>
<outputDirectory>${project.build.directory}/downloads/browser</outputDirectory>
<skipCache>true</skipCache>
<overwrite>true</overwrite>
</configuration>
</execution>
<execution>
<id>get-w3c_css</id>
<phase>validate</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/w3c_css.js</url>
<outputFileName>w3c_css.js</outputFileName>
<outputDirectory>${project.build.directory}/downloads/browser</outputDirectory>
<skipCache>true</skipCache>
<overwrite>true</overwrite>
</configuration>
</execution>
<execution>
<id>get-gecko_dom</id>
<phase>validate</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/gecko_dom.js</url>
<outputFileName>gecko_dom.js</outputFileName>
<outputDirectory>${project.build.directory}/downloads/browser</outputDirectory>
<skipCache>true</skipCache>
<overwrite>true</overwrite>
</configuration>
</execution>
<execution>
<id>get-w3c_dom2</id>
<phase>validate</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/w3c_dom2.js</url>
<outputFileName>w3c_dom2.js</outputFileName>
<outputDirectory>${project.build.directory}/downloads/browser</outputDirectory>
<skipCache>true</skipCache>
<overwrite>true</overwrite>
</configuration>
</execution>
<execution>
<id>get-html5</id>
<phase>validate</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/html5.js</url>
<outputFileName>html5.js</outputFileName>
<outputDirectory>${project.build.directory}/downloads/browser</outputDirectory>
<skipCache>true</skipCache>
<overwrite>true</overwrite>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.royale.compiler</groupId>
<artifactId>royale-maven-plugin</artifactId>
<version>${royale.compiler.version}</version>
<extensions>true</extensions>
<configuration>
<includeSources>true</includeSources>
<externcInput>
<fileSet>
<directory>${project.basedir}/src/main/javascript</directory>
<includes>
<include>**/*.js</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.basedir}/target/downloads</directory>
<includes>
<include>*.js</include>
<include>browser/w3c_*.js</include>
<include>browser/window.js</include>
<include>browser/ie_dom.js</include>
<include>browser/gecko_*.js</include>
<include>browser/webkit_*.js</include>
<include>browser/iphone.js</include>
<!-- <include>browser/chrome.js</include> -->
<include>browser/flash.js</include>
<include>browser/page_visibility.js</include>
<include>browser/fileapi.js</include>
<include>browser/html5.js</include>
<include>browser/webgl.js</include>
<include>browser/webstorage.js</include>
<include>browser/whatwg_encoding.js</include>
<include>es6_collections.js</include>
</includes>
<excludes>
<exclude>browser/w3c_dom4.js</exclude>
<exclude>browser/w3c_serviceworker.js</exclude>
<exclude>browser/w3c_webcrypto.js</exclude>
<exclude>browser/gecko_css.js</exclude>
<exclude>browser/webkit_notifications.js</exclude>
</excludes>
</fileSet>
</externcInput>
<externcConfig>
<class-excludes>
<class-exclude>
<className>controlRange</className>
</class-exclude>
<class-exclude>
<className>CustomEvent</className>
</class-exclude>
</class-excludes>
<field-excludes>
<field-exclude>
<className>Window</className>
<field>focus</field>
</field-exclude>
</field-excludes>
<excludes>
<exclude>
<className>Array</className>
<name>toSource</name>
</exclude>
<exclude>
<className>Date</className>
<name>valueOf</name>
</exclude>
<exclude>
<className>String</className>
<name>valueOf</name>
</exclude>
<!-- SVG -->
<exclude>
<className>SVGStylable</className>
<name>className</name>
</exclude>
<exclude>
<className>SVGStylable</className>
<name>style</name>
</exclude>
<exclude>
<className>SVGLocatable</className>
<name>farthestViewportElement</name>
</exclude>
<exclude>
<className>SVGLocatable</className>
<name>nearestViewportElement</name>
</exclude>
<exclude>
<className>Document</className>
<name>loadXML</name>
</exclude>
<exclude>
<className>Document</className>
<name>open</name>
</exclude>
<exclude>
<className>Document</className>
<name>close</name>
</exclude>
<exclude>
<className>Document</className>
<name>createTreeWalker</name>
</exclude>
<exclude>
<className>Element</className>
<name>load</name>
</exclude>
<exclude>
<className>Event</className>
<name>initUIEvent</name>
</exclude>
<exclude>
<className>Event</className>
<name>initMessageEvent</name>
</exclude>
</excludes>
</externcConfig>
<includeFiles>
<includeFile>
<name>externs/svg.js</name>
<path>downloads/svg.js</path>
</includeFile>
</includeFiles>
<skipSwc>true</skipSwc>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.royale.compiler</groupId>
<artifactId>compiler-jx</artifactId>
<version>${royale.compiler.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>