diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2021-05-04 17:48:18 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2021-05-04 17:48:18 +0000 |
commit | 1d6cdf7ac8eb0ffce5efed53fb26af7672f27283 (patch) | |
tree | fbe5c6b24b53ba8eb39d865f0704e5d8b7262a8f | |
parent | 06f521f22319b3ba697e31594b005320fd4c0f06 (diff) | |
parent | 3b3fac58e1fd6ccdbb7fa0d1b3cd2cbce78aab56 (diff) | |
download | dalvik-android11-platform-release.tar.gz |
Snap for 7316203 from 3b3fac58e1fd6ccdbb7fa0d1b3cd2cbce78aab56 to rvc-platform-releaseandroid-platform-11.0.0_r9android-platform-11.0.0_r8android-platform-11.0.0_r7android-platform-11.0.0_r40android-platform-11.0.0_r39android-platform-11.0.0_r38android-platform-11.0.0_r37android-platform-11.0.0_r36android-platform-11.0.0_r35android-platform-11.0.0_r34android-platform-11.0.0_r33android-platform-11.0.0_r32android-platform-11.0.0_r31android-platform-11.0.0_r30android-platform-11.0.0_r29android-platform-11.0.0_r28android-platform-11.0.0_r27android-platform-11.0.0_r26android-platform-11.0.0_r25android-platform-11.0.0_r24android-platform-11.0.0_r23android-platform-11.0.0_r22android-platform-11.0.0_r21android-platform-11.0.0_r20android-platform-11.0.0_r19android-platform-11.0.0_r18android-platform-11.0.0_r17android-platform-11.0.0_r16android-platform-11.0.0_r15android-platform-11.0.0_r14android-platform-11.0.0_r13android-platform-11.0.0_r12android-platform-11.0.0_r11android-platform-11.0.0_r10android11-platform-release
Change-Id: I016fc5821ab6d2a641d08bf0680e75f52f8d4e88
-rwxr-xr-x | dx/etc/dx.bat | 34 | ||||
-rwxr-xr-x | dx/etc/mainDexClasses.bat | 32 |
2 files changed, 55 insertions, 11 deletions
diff --git a/dx/etc/dx.bat b/dx/etc/dx.bat index 654588617..f2e3857df 100755 --- a/dx/etc/dx.bat +++ b/dx/etc/dx.bat @@ -22,12 +22,34 @@ REM Set up prog to be the path of this script, including following symlinks, REM and set up progdir to be the fully-qualified pathname of its directory.
set prog=%~f0
-rem Check we have a valid Java.exe in the path.
-set java_exe=
-if exist "%~dp0..\tools\lib\find_java.bat" call "%~dp0..\tools\lib\find_java.bat"
-if exist "%~dp0..\..\tools\lib\find_java.bat" call "%~dp0..\..\tools\lib\find_java.bat"
-if not defined java_exe goto :EOF
-
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+exit /b 1
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+exit /b 1
+
+:init
set jarfile=dx.jar
set "frameworkdir=%~dp0"
rem frameworkdir must not end with a dir sep.
diff --git a/dx/etc/mainDexClasses.bat b/dx/etc/mainDexClasses.bat index dc5f2c355..232635ca0 100755 --- a/dx/etc/mainDexClasses.bat +++ b/dx/etc/mainDexClasses.bat @@ -16,12 +16,34 @@ REM limitations under the License. REM don't modify the caller's environment
setlocal
-rem Check we have a valid Java.exe in the path.
-set java_exe=
-if exist "%~dp0..\tools\lib\find_java.bat" call "%~dp0..\tools\lib\find_java.bat"
-if exist "%~dp0..\..\tools\lib\find_java.bat" call "%~dp0..\..\tools\lib\find_java.bat"
-if not defined java_exe goto :EOF
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+exit /b 1
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+exit /b 1
+:init
set baserules="%~dp0\mainDexClasses.rules"
set extrarules="%~dp0\mainDexClassesNoAapt.rules"
|