| <?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 basedir="." default="build" name="groovy/gradle"> |
| <description>Builds, tests, and runs the project org.netbeans.modules.gradle</description> |
| <import file="../../nbbuild/templates/projectized.xml"/> |
| |
| <taskdef name="configureproxy" classname="org.netbeans.nbbuild.extlibs.ConfigureProxy" classpath="${nbantext.jar}"/> |
| |
| <property name="test-unit-sys-prop.test.data.dir" location="test/data"/> |
| <property name="tooling" value="netbeans-gradle-tooling"/> |
| <available property="have.gradle.wrapper" file="${tooling}/gradle/wrapper/gradle-wrapper.jar"/> |
| |
| <target name="-uptodate-tooling"> |
| <uptodate property="tooling.uptodate" targetfile="build/tooling/${tooling}.jar"> |
| <srcfiles dir="${tooling}/src/main"/> |
| </uptodate> |
| </target> |
| <target name="-copy-gradle-wrapper" depends="projectized-common.-release.files" unless="have.gradle.wrapper"> |
| <copy file="external/gradle-wrapper-4.10.2.jar" tofile="${tooling}/gradle/wrapper/gradle-wrapper.jar"/> |
| </target> |
| |
| <target name="build-tooling-lib" depends="-download.release.files,-copy-gradle-wrapper,-uptodate-tooling" unless="tooling.uptodate"> |
| <configureproxy connectTo="http://netbeans.apache.org" hostProperty="proxyHost" portProperty="proxyPort"/> |
| <condition property="gradle.proxy.args" value="-Dhttp.proxyHost=${proxyHost} -Dhttp.proxyPort=${proxyPort} -Dhttps.proxyHost=${proxyHost} -Dhttps.proxyPort=${proxyPort}"> |
| <not> |
| <equals arg1="${proxyHost}" arg2="" /> |
| </not> |
| </condition> |
| <property name="gradle.proxy.args" value=""/> |
| |
| <java fork="true" dir="${tooling}" classpath="${tooling}/gradle/wrapper/gradle-wrapper.jar" classname="org.gradle.wrapper.GradleWrapperMain" failonerror="true"> |
| <sysproperty key="org.gradle.appname" value="Gradle"/> |
| <arg line="${gradle.proxy.args}"/> |
| <arg line="clean build -x check"/> |
| </java> |
| <copy file="${tooling}/build/libs/${tooling}.jar" todir="build/tooling" overwrite="true"/> |
| <copy file="${tooling}/src/main/resources/nb-tooling.gradle" todir="build/tooling" overwrite="true"/> |
| </target> |
| <target name="package-project-templates"> |
| <local name="templates.dir"/> |
| <property name="templates.dir" location="build/classes-generated/org/netbeans/modules/gradle/templates"/> |
| <mkdir dir="${templates.dir}"/> |
| <zip compress="9" basedir="templates/multi-project" zipfile="${templates.dir}/multi-project.zip"/> |
| </target> |
| |
| <target name="clean" depends="projectized.clean"> |
| <delete dir="${tooling}/build"/> |
| </target> |
| <target name="compile" depends="build-tooling-lib, projectized-common.compile"/> |
| |
| </project> |
| |