This is an automated email from the ASF dual-hosted git repository. joshtynjala pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/flex-flexunit.git
commit 15a440168a2a001a791dbbec678d2d3ed2225e99 Author: Josh Tynjala <joshtynj...@bowlerhat.dev> AuthorDate: Mon Mar 4 14:09:40 2024 -0800 Auto-detect flex-sdk in same parent directory as flex-flexunit, if env.FLEX_HOME isn't set But only if lib/compc.jar exists in flex-sdk --- FlexUnit4/build.xml | 9 ++++++- FlexUnit4AirCIListener/build.xml | 9 ++++++- FlexUnit4CIListener/build.xml | 9 ++++++- FlexUnit4FlexCoverListener/build.xml | 9 ++++++- FlexUnit4FluintExtensions/build.xml | 9 ++++++- FlexUnit4SampleCIProject/build.air.xml | 9 ++++++- FlexUnit4SampleCIProject/build.browser.xml | 41 +++++++++++++++++------------- FlexUnit4SampleCIProject/build.custom.xml | 41 +++++++++++++++++------------- FlexUnit4SampleCIProject/build.xml | 41 +++++++++++++++++------------- FlexUnit4Test/build.xml | 9 ++++++- FlexUnit4UIListener/build.xml | 9 ++++++- 11 files changed, 136 insertions(+), 59 deletions(-) diff --git a/FlexUnit4/build.xml b/FlexUnit4/build.xml index 7bb3c3e..595b2ad 100644 --- a/FlexUnit4/build.xml +++ b/FlexUnit4/build.xml @@ -41,7 +41,14 @@ <property name="doc.loc" location="${basedir}/target/docs" /> <!-- Setup Flex Ant Resources --> - <property name="FLEX_HOME" location="${env.FLEX_HOME}" /> + <available file="${env.FLEX_HOME}/lib/compc.jar" + type="file" + property="FLEX_HOME" + value="${env.FLEX_HOME}"/> + <available file="${basedir}/../../flex-sdk/lib/compc.jar" + type="file" + property="FLEX_HOME" + value="${basedir}/../../flex-sdk"/> <property name="FLEX_COVER_HOME" location="${env.FLEX_COVER_HOME}" /> <taskdef resource="flexTasks.tasks" > <classpath> diff --git a/FlexUnit4AirCIListener/build.xml b/FlexUnit4AirCIListener/build.xml index d516848..99d7f5d 100644 --- a/FlexUnit4AirCIListener/build.xml +++ b/FlexUnit4AirCIListener/build.xml @@ -37,7 +37,14 @@ <property name="doc.loc" location="${basedir}/target/docs" /> <!-- Setup Flex Ant Resources --> - <property name="FLEX_HOME" location="${env.FLEX_HOME}" /> + <available file="${env.FLEX_HOME}/lib/compc.jar" + type="file" + property="FLEX_HOME" + value="${env.FLEX_HOME}"/> + <available file="${basedir}/../../flex-sdk/lib/compc.jar" + type="file" + property="FLEX_HOME" + value="${basedir}/../../flex-sdk"/> <taskdef resource="flexTasks.tasks" > <classpath> <pathelement location="${FLEX_HOME}/ant/lib/flexTasks.jar"/> diff --git a/FlexUnit4CIListener/build.xml b/FlexUnit4CIListener/build.xml index 667d915..29e3a7f 100644 --- a/FlexUnit4CIListener/build.xml +++ b/FlexUnit4CIListener/build.xml @@ -37,7 +37,14 @@ <property name="doc.loc" location="${basedir}/target/docs" /> <!-- Setup Flex Ant Resources --> - <property name="FLEX_HOME" location="${env.FLEX_HOME}" /> + <available file="${env.FLEX_HOME}/lib/compc.jar" + type="file" + property="FLEX_HOME" + value="${env.FLEX_HOME}"/> + <available file="${basedir}/../../flex-sdk/lib/compc.jar" + type="file" + property="FLEX_HOME" + value="${basedir}/../../flex-sdk"/> <taskdef resource="flexTasks.tasks" > <classpath> <pathelement location="${FLEX_HOME}/ant/lib/flexTasks.jar"/> diff --git a/FlexUnit4FlexCoverListener/build.xml b/FlexUnit4FlexCoverListener/build.xml index 844f9e3..2c4fe7c 100644 --- a/FlexUnit4FlexCoverListener/build.xml +++ b/FlexUnit4FlexCoverListener/build.xml @@ -37,7 +37,14 @@ <property name="doc.loc" location="${basedir}/target/docs" /> <!-- Setup Flex Ant Resources --> - <property name="FLEX_HOME" location="${env.FLEX_HOME}" /> + <available file="${env.FLEX_HOME}/lib/compc.jar" + type="file" + property="FLEX_HOME" + value="${env.FLEX_HOME}"/> + <available file="${basedir}/../../flex-sdk/lib/compc.jar" + type="file" + property="FLEX_HOME" + value="${basedir}/../../flex-sdk"/> <taskdef resource="flexTasks.tasks" > <classpath> <pathelement location="${FLEX_HOME}/ant/lib/flexTasks.jar"/> diff --git a/FlexUnit4FluintExtensions/build.xml b/FlexUnit4FluintExtensions/build.xml index c574386..bf19f60 100644 --- a/FlexUnit4FluintExtensions/build.xml +++ b/FlexUnit4FluintExtensions/build.xml @@ -37,7 +37,14 @@ <property name="doc.loc" location="${basedir}/target/docs" /> <!-- Setup Flex Ant Resources --> - <property name="FLEX_HOME" location="${env.FLEX_HOME}" /> + <available file="${env.FLEX_HOME}/lib/compc.jar" + type="file" + property="FLEX_HOME" + value="${env.FLEX_HOME}"/> + <available file="${basedir}/../../flex-sdk/lib/compc.jar" + type="file" + property="FLEX_HOME" + value="${basedir}/../../flex-sdk"/> <taskdef resource="flexTasks.tasks" > <classpath> <pathelement location="${FLEX_HOME}/ant/lib/flexTasks.jar"/> diff --git a/FlexUnit4SampleCIProject/build.air.xml b/FlexUnit4SampleCIProject/build.air.xml index f957f0a..abcb073 100644 --- a/FlexUnit4SampleCIProject/build.air.xml +++ b/FlexUnit4SampleCIProject/build.air.xml @@ -39,7 +39,14 @@ <!-- Setup Flex and FlexUnit ant tasks --> <!-- You can set this directly so mxmlc will work correctly, or set FLEX_HOME as an environment variable and use as below --> - <property name="FLEX_HOME" location="${env.FLEX_HOME}" /> + <available file="${env.FLEX_HOME}/lib/compc.jar" + type="file" + property="FLEX_HOME" + value="${env.FLEX_HOME}"/> + <available file="${basedir}/../../flex-sdk/lib/compc.jar" + type="file" + property="FLEX_HOME" + value="${basedir}/../../flex-sdk"/> <taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" /> <taskdef resource="flexUnitTasks.tasks"> <classpath> diff --git a/FlexUnit4SampleCIProject/build.browser.xml b/FlexUnit4SampleCIProject/build.browser.xml index c886d5c..cdb517d 100644 --- a/FlexUnit4SampleCIProject/build.browser.xml +++ b/FlexUnit4SampleCIProject/build.browser.xml @@ -1,20 +1,20 @@ <?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. ---> +<!-- + 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. +--> <!-- This is intended to be a simple build file, created a suggestion for the necessary steps need to utilize the FlexUnit4 Ant task. For the most detail when running this build, call "ant -v clean package". The build uses a simple lifecycle of: @@ -39,7 +39,14 @@ <!-- Setup Flex and FlexUnit ant tasks --> <!-- You can set this directly so mxmlc will work correctly, or set FLEX_HOME as an environment variable and use as below --> - <property name="FLEX_HOME" location="${env.FLEX_HOME}" /> + <available file="${env.FLEX_HOME}/lib/compc.jar" + type="file" + property="FLEX_HOME" + value="${env.FLEX_HOME}"/> + <available file="${basedir}/../../flex-sdk/lib/compc.jar" + type="file" + property="FLEX_HOME" + value="${basedir}/../../flex-sdk"/> <taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" /> <taskdef resource="flexUnitTasks.tasks"> <classpath> diff --git a/FlexUnit4SampleCIProject/build.custom.xml b/FlexUnit4SampleCIProject/build.custom.xml index db298d6..bb90d5c 100644 --- a/FlexUnit4SampleCIProject/build.custom.xml +++ b/FlexUnit4SampleCIProject/build.custom.xml @@ -1,20 +1,20 @@ <?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. ---> +<!-- + 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. +--> <!-- This is intended to be a simple build file, created a suggestion for the necessary steps need to utilize the FlexUnit4 Ant task. For the most detail when running this build, call "ant -v clean package". The build uses a simple lifecycle of: @@ -39,7 +39,14 @@ <!-- Setup Flex and FlexUnit ant tasks --> <!-- You can set this directly so mxmlc will work correctly, or set FLEX_HOME as an environment variable and use as below --> - <property name="FLEX_HOME" location="${env.FLEX_HOME}" /> + <available file="${env.FLEX_HOME}/lib/compc.jar" + type="file" + property="FLEX_HOME" + value="${env.FLEX_HOME}"/> + <available file="${basedir}/../../flex-sdk/lib/compc.jar" + type="file" + property="FLEX_HOME" + value="${basedir}/../../flex-sdk"/> <taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" /> <taskdef resource="flexUnitTasks.tasks"> <classpath> diff --git a/FlexUnit4SampleCIProject/build.xml b/FlexUnit4SampleCIProject/build.xml index c586844..966b10f 100644 --- a/FlexUnit4SampleCIProject/build.xml +++ b/FlexUnit4SampleCIProject/build.xml @@ -1,20 +1,20 @@ <?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. ---> +<!-- + 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. +--> <!-- This is intended to be a simple build file, created a suggestion for the necessary steps need to utilize the FlexUnit4 Ant task. For the most detail when running this build, call "ant -v clean package". The build uses a simple lifecycle of: @@ -39,7 +39,14 @@ <!-- Setup Flex and FlexUnit ant tasks --> <!-- You can set this directly so mxmlc will work correctly, or set FLEX_HOME as an environment variable and use as below --> - <property name="FLEX_HOME" location="${env.FLEX_HOME}" /> + <available file="${env.FLEX_HOME}/lib/compc.jar" + type="file" + property="FLEX_HOME" + value="${env.FLEX_HOME}"/> + <available file="${basedir}/../../flex-sdk/lib/compc.jar" + type="file" + property="FLEX_HOME" + value="${basedir}/../../flex-sdk"/> <taskdef resource="flexTasks.tasks" > <classpath> <pathelement location="${FLEX_HOME}/ant/lib/flexTasks.jar"/> diff --git a/FlexUnit4Test/build.xml b/FlexUnit4Test/build.xml index 9c89a96..2fc183c 100644 --- a/FlexUnit4Test/build.xml +++ b/FlexUnit4Test/build.xml @@ -42,7 +42,14 @@ <property name="report.flexcover.loc" location="${basedir}/target/report/flexcover" /> <!-- Setup Flex Ant Resources --> - <property name="FLEX_HOME" location="${env.FLEX_HOME}" /> + <available file="${env.FLEX_HOME}/lib/compc.jar" + type="file" + property="FLEX_HOME" + value="${env.FLEX_HOME}"/> + <available file="${basedir}/../../flex-sdk/lib/compc.jar" + type="file" + property="FLEX_HOME" + value="${basedir}/../../flex-sdk"/> <property name="FLEX_COVER_VIEWER" location="${env.FLEX_COVER_VIEWER}" /> <taskdef resource="flexTasks.tasks" > <classpath> diff --git a/FlexUnit4UIListener/build.xml b/FlexUnit4UIListener/build.xml index 138158b..549deb0 100644 --- a/FlexUnit4UIListener/build.xml +++ b/FlexUnit4UIListener/build.xml @@ -38,7 +38,14 @@ <property name="doc.loc" location="${basedir}/target/docs" /> <!-- Setup Flex Ant Resources --> - <property name="FLEX_HOME" location="${env.FLEX_HOME}" /> + <available file="${env.FLEX_HOME}/lib/compc.jar" + type="file" + property="FLEX_HOME" + value="${env.FLEX_HOME}"/> + <available file="${basedir}/../../flex-sdk/lib/compc.jar" + type="file" + property="FLEX_HOME" + value="${basedir}/../../flex-sdk"/> <taskdef resource="flexTasks.tasks" > <classpath> <pathelement location="${FLEX_HOME}/ant/lib/flexTasks.jar"/>