Commit b1d4e5d7 authored by Ben Joyce's avatar Ben Joyce Committed by Commit Bot

Add jetify-standalone to third_party

-Updates intellij to 13.0.
-Adds commons-cli for standalone script.
-Adds Kotlin and jetifier to android_deps.

Bug: 896775
Change-Id: Ibccfda9574261f7f0cc49270bf8ff84a1ff0f5ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1992352
Commit-Queue: benjamin joyce <bjoyce@google.com>
Reviewed-by: default avatarYaron Friedman <yfriedman@chromium.org>
Reviewed-by: default avatarPeter Wen <wnwen@chromium.org>
Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#734246}
parent 37470a6d
......@@ -2666,6 +2666,28 @@ deps = {
'dep_type': 'cipd',
},
'src/third_party/android_deps/libs/com_android_tools_build_jetifier_jetifier_core': {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_tools_build_jetifier_jetifier_core',
'version': 'version:1.0.0-beta08-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/android_deps/libs/com_android_tools_build_jetifier_jetifier_processor': {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_android_tools_build_jetifier_jetifier_processor',
'version': 'version:1.0.0-beta08-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/android_deps/libs/com_github_kevinstern_software_and_algorithms': {
'packages': [
{
......@@ -3194,6 +3216,17 @@ deps = {
'dep_type': 'cipd',
},
'src/third_party/android_deps/libs/commons_cli_commons_cli': {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/commons_cli_commons_cli',
'version': 'version:1.3.1-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/android_deps/libs/javax_annotation_javax_annotation_api': {
'packages': [
{
......@@ -3293,6 +3326,39 @@ deps = {
'dep_type': 'cipd',
},
'src/third_party/android_deps/libs/org_jdom_jdom2': {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_jdom_jdom2',
'version': 'version:2.0.6-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib': {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib',
'version': 'version:1.3.41-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_common': {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_common',
'version': 'version:1.3.41-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/android_deps/libs/org_pcollections_pcollections': {
'packages': [
{
......
......@@ -772,6 +772,21 @@ android_aar_prebuilt("com_android_support_viewpager_java") {
]
}
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
java_prebuilt("com_android_tools_build_jetifier_jetifier_processor_java") {
jar_path = "libs/com_android_tools_build_jetifier_jetifier_processor/jetifier-processor-1.0.0-beta08.jar"
output_name = "com_android_tools_build_jetifier_jetifier_processor"
enable_bytecode_rewriter = false
deps = [
":com_android_tools_build_jetifier_jetifier_core_java",
":org_jdom_jdom2_java",
":org_jetbrains_kotlin_kotlin_stdlib_java",
"//third_party/ow2_asm:asm_commons_java",
"//third_party/ow2_asm:asm_java",
"//third_party/ow2_asm:asm_util_java",
]
}
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
android_aar_prebuilt("google_play_services_auth_java") {
aar_path = "libs/com_google_android_gms_play_services_auth/play-services-auth-15.0.1.aar"
......@@ -1118,6 +1133,13 @@ java_prebuilt("com_squareup_javapoet_java") {
enable_bytecode_rewriter = false
}
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
java_prebuilt("commons_cli_commons_cli_java") {
jar_path = "libs/commons_cli_commons_cli/commons-cli-1.3.1.jar"
output_name = "commons_cli_commons_cli"
enable_bytecode_rewriter = false
}
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
java_prebuilt("javax_annotation_javax_annotation_api_java") {
jar_path = "libs/javax_annotation_javax_annotation_api/javax.annotation-api-1.3.2.jar"
......@@ -1637,6 +1659,21 @@ android_aar_prebuilt("com_android_support_versionedparcelable_java") {
ignore_aidl = true
}
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
java_prebuilt("com_android_tools_build_jetifier_jetifier_core_java") {
jar_path = "libs/com_android_tools_build_jetifier_jetifier_core/jetifier-core-1.0.0-beta08.jar"
output_name = "com_android_tools_build_jetifier_jetifier_core"
enable_bytecode_rewriter = false
# To remove visibility constraint, add this dependency to
# //third_party/android_deps/build.gradle.
visibility = [ ":*" ]
deps = [
":org_jetbrains_kotlin_kotlin_stdlib_java",
"//third_party/gson:gson_java",
]
}
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
java_prebuilt("com_github_kevinstern_software_and_algorithms_java") {
jar_path = "libs/com_github_kevinstern_software_and_algorithms/software-and-algorithms-1.0.jar"
......@@ -2011,6 +2048,43 @@ java_prebuilt("org_codehaus_mojo_animal_sniffer_annotations_java") {
visibility = [ ":*" ]
}
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
java_prebuilt("org_jdom_jdom2_java") {
jar_path = "libs/org_jdom_jdom2/jdom2-2.0.6.jar"
output_name = "org_jdom_jdom2"
enable_bytecode_rewriter = false
# To remove visibility constraint, add this dependency to
# //third_party/android_deps/build.gradle.
visibility = [ ":*" ]
}
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
java_prebuilt("org_jetbrains_kotlin_kotlin_stdlib_java") {
jar_path = "libs/org_jetbrains_kotlin_kotlin_stdlib/kotlin-stdlib-1.3.41.jar"
output_name = "org_jetbrains_kotlin_kotlin_stdlib"
enable_bytecode_rewriter = false
# To remove visibility constraint, add this dependency to
# //third_party/android_deps/build.gradle.
visibility = [ ":*" ]
deps = [
":org_jetbrains_kotlin_kotlin_stdlib_common_java",
"//third_party/intellij:intellij_annotations_java",
]
}
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
java_prebuilt("org_jetbrains_kotlin_kotlin_stdlib_common_java") {
jar_path = "libs/org_jetbrains_kotlin_kotlin_stdlib_common/kotlin-stdlib-common-1.3.41.jar"
output_name = "org_jetbrains_kotlin_kotlin_stdlib_common"
enable_bytecode_rewriter = false
# To remove visibility constraint, add this dependency to
# //third_party/android_deps/build.gradle.
visibility = [ ":*" ]
}
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
java_prebuilt("org_pcollections_pcollections_java") {
jar_path = "libs/org_pcollections_pcollections/pcollections-2.1.2.jar"
......
......@@ -97,6 +97,8 @@
"libs/com_android_support_transition",
"libs/com_android_support_versionedparcelable",
"libs/com_android_support_viewpager",
"libs/com_android_tools_build_jetifier_jetifier_core",
"libs/com_android_tools_build_jetifier_jetifier_processor",
"libs/com_github_kevinstern_software_and_algorithms",
"libs/com_github_stephenc_jcip_jcip_annotations",
"libs/com_google_android_gms_play_services_auth",
......@@ -145,6 +147,7 @@
"libs/com_google_protobuf_protobuf_lite",
"libs/com_googlecode_java_diff_utils_diffutils",
"libs/com_squareup_javapoet",
"libs/commons_cli_commons_cli",
"libs/javax_annotation_javax_annotation_api",
"libs/javax_annotation_jsr250_api",
"libs/javax_inject_javax_inject",
......@@ -154,5 +157,8 @@
"libs/org_checkerframework_dataflow",
"libs/org_checkerframework_javacutil",
"libs/org_codehaus_mojo_animal_sniffer_annotations",
"libs/org_jdom_jdom2",
"libs/org_jetbrains_kotlin_kotlin_stdlib",
"libs/org_jetbrains_kotlin_kotlin_stdlib_common",
"libs/org_pcollections_pcollections"
]
......@@ -137,6 +137,10 @@ dependencies {
buildCompile "com.google.errorprone:error_prone_core:2.3.3"
// Jetify to androidx.
buildCompile "com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta08"
buildCompile "commons-cli:commons-cli:1.3.1"
// testCompile targets have test_only = true.
testCompile "androidx.test:core:1.0.0"
testCompile "androidx.test:monitor:1.1.0"
......
......@@ -35,8 +35,14 @@ class BuildConfigGenerator extends DefaultTask {
// Some libraries are hosted in Chromium's //third_party directory. This is a mapping between
// them so they can be used instead of android_deps pulling in its own copy.
private static final def EXISTING_LIBS = [
'com_google_code_gson_gson': '//third_party/gson:gson_java',
'junit_junit': '//third_party/junit:junit',
'org_hamcrest_hamcrest_core': '//third_party/hamcrest:hamcrest_core_java',
'org_jetbrains_annotations': '//third_party/intellij:intellij_annotations_java',
'org_ow2_asm_asm': '//third_party/ow2_asm:asm_java',
'org_ow2_asm_asm_commons': '//third_party/ow2_asm:asm_commons_java',
'org_ow2_asm_asm_tree': '//third_party/ow2_asm:asm_tree_java',
'org_ow2_asm_asm_util': '//third_party/ow2_asm:asm_util_java',
]
......
......@@ -76,6 +76,8 @@ class ChromiumDepGraph {
url: "https://github.com/google-ar/arcore-android-sdk",
licenseUrl: "https://raw.githubusercontent.com/google-ar/arcore-android-sdk/master/LICENSE",
licenseName: "Apache 2.0"),
'commons_cli_commons_cli': new PropertyOverride(
licenseName: "Apache 2.0"),
'javax_annotation_javax_annotation_api': new PropertyOverride(
isShipped: false, // Annotations are stripped by R8.
licenseName: "CDDLv1.1",
......
file://third_party/android_deps/OWNERS
\ No newline at end of file
Name: Android Jetifier Core
Short Name: jetifier-core
URL: https://developer.android.com/jetpack/androidx
Version: 1.0.0-beta08
License: Apache Version 2.0
License File: LICENSE
Security Critical: yes
Description:
Android Jetifier Core
Local Modifications:
No modifications.
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# To create CIPD package run the following command.
# cipd create --pkg-def cipd.yaml -tag version:1.0.0-beta08-cr0
package: chromium/third_party/android_deps/libs/com_android_tools_build_jetifier_jetifier_core
description: "Android Jetifier Core"
data:
- file: jetifier-core-1.0.0-beta08.jar
file://third_party/android_deps/OWNERS
\ No newline at end of file
Name: Android Jetifier Processor
Short Name: jetifier-processor
URL: https://developer.android.com/jetpack/androidx
Version: 1.0.0-beta08
License: Apache Version 2.0
License File: LICENSE
Security Critical: yes
Description:
Android Jetifier Processor
Local Modifications:
No modifications.
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# To create CIPD package run the following command.
# cipd create --pkg-def cipd.yaml -tag version:1.0.0-beta08-cr0
package: chromium/third_party/android_deps/libs/com_android_tools_build_jetifier_jetifier_processor
description: "Android Jetifier Processor"
data:
- file: jetifier-processor-1.0.0-beta08.jar
file://third_party/android_deps/OWNERS
\ No newline at end of file
Name: Apache Commons CLI
Short Name: commons-cli
URL: http://commons.apache.org/proper/commons-cli/
Version: 1.3.1
License: Apache 2.0
License File: LICENSE
Security Critical: yes
Description:
Apache Commons CLI provides a simple API for presenting, processing and validating a command line interface.
Local Modifications:
No modifications.
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# To create CIPD package run the following command.
# cipd create --pkg-def cipd.yaml -tag version:1.3.1-cr0
package: chromium/third_party/android_deps/libs/commons_cli_commons_cli
description: "Apache Commons CLI"
data:
- file: commons-cli-1.3.1.jar
/*--
Copyright (C) 2000-2012 Jason Hunter & Brett McLaughlin.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions, and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions, and the disclaimer that follows
these conditions in the documentation and/or other materials
provided with the distribution.
3. The name "JDOM" must not be used to endorse or promote products
derived from this software without prior written permission. For
written permission, please contact <request_AT_jdom_DOT_org>.
4. Products derived from this software may not be called "JDOM", nor
may "JDOM" appear in their name, without prior written permission
from the JDOM Project Management <request_AT_jdom_DOT_org>.
In addition, we request (but do not require) that you include in the
end-user documentation provided with the redistribution and/or in the
software itself an acknowledgement equivalent to the following:
"This product includes software developed by the
JDOM Project (http://www.jdom.org/)."
Alternatively, the acknowledgment may be graphical using the logos
available at http://www.jdom.org/images/logos.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
This software consists of voluntary contributions made by many
individuals on behalf of the JDOM Project and was originally
created by Jason Hunter <jhunter_AT_jdom_DOT_org> and
Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information
on the JDOM Project, please see <http://www.jdom.org/>.
*/
file://third_party/android_deps/OWNERS
\ No newline at end of file
Name: JDOM
Short Name: jdom2
URL: http://www.jdom.org
Version: 2.0.6
License: Similar to Apache License but with the acknowledgment clause removed
License File: LICENSE
Security Critical: yes
Description:
A complete, Java-based solution for accessing, manipulating, and outputting XML data
Local Modifications:
No modifications.
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# To create CIPD package run the following command.
# cipd create --pkg-def cipd.yaml -tag version:2.0.6-cr0
package: chromium/third_party/android_deps/libs/org_jdom_jdom2
description: "JDOM"
data:
- file: jdom2-2.0.6.jar
file://third_party/android_deps/OWNERS
\ No newline at end of file
Name: org.jetbrains.kotlin:kotlin-stdlib
Short Name: kotlin-stdlib
URL: https://kotlinlang.org/
Version: 1.3.41
License: The Apache License, Version 2.0
License File: LICENSE
Security Critical: yes
Description:
Kotlin Standard Library for JVM
Local Modifications:
No modifications.
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# To create CIPD package run the following command.
# cipd create --pkg-def cipd.yaml -tag version:1.3.41-cr0
package: chromium/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib
description: "org.jetbrains.kotlin:kotlin-stdlib"
data:
- file: kotlin-stdlib-1.3.41.jar
file://third_party/android_deps/OWNERS
\ No newline at end of file
Name: org.jetbrains.kotlin:kotlin-stdlib-common
Short Name: kotlin-stdlib-common
URL: https://kotlinlang.org/
Version: 1.3.41
License: The Apache License, Version 2.0
License File: LICENSE
Security Critical: yes
Description:
Kotlin Common Standard Library
Local Modifications:
No modifications.
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# To create CIPD package run the following command.
# cipd create --pkg-def cipd.yaml -tag version:1.3.41-cr0
package: chromium/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_common
description: "org.jetbrains.kotlin:kotlin-stdlib-common"
data:
- file: kotlin-stdlib-common-1.3.41.jar
......@@ -5,6 +5,5 @@
import("//build/config/android/rules.gni")
java_prebuilt("intellij_annotations_java") {
testonly = true
jar_path = "lib/annotations.jar"
}
jbudorick@chromium.org
mikecase@chromium.org
yolandyan@chromium.org
agrieve@chromium.org
bjoyce@chromium.org
wnwen@chromium.org
# COMPONENT: Test>Android
Name: IntelliJ Annotations
URL: https://www.jetbrains.com/help/idea/2016.1/annotating-source-code.html
Version: 12.0
Version: 13.0
License: Apache 2.0
License File: NOT_SHIPPED
Security Critical: no
......
......@@ -3,7 +3,7 @@
# found in the LICENSE file.
# To create CIPD package run the following command.
# cipd create --pkg-def cipd.yaml -tag version:$(cat version.txt)
# cipd create --pkg-def cipd.yaml -tag version:13.0-cr0
package: chromium/third_party/intellij
description: intellij Java library
data:
......
This diff is collapsed.
bjoyce@chromium.org
agrieve@chromium.org
wnwen@chromium.org
Name: Jetifier-standalone
URL: https://dl.google.com/dl/android/studio/jetifier-zips/1.0.0-beta08/jetifier-standalone.zip
Version: 1.0.0-beta08
License: Apache 2.0
License File: NOT_SHIPPED
Security Critical: yes
Description:
The standalone Jetifier tool migrates support-library-dependent libraries to
rely on the equivalent AndroidX packages instead.
https://developer.android.com/studio/command-line/jetifier
Local Modifications:
-Classpaths in jettifier-standalone are changed to get jars in third_party.
-Ignore_R config file removes some mappings to avoid having duplicate resources
with androidx library and android_support library.
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed 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
#
# https://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.
#
##############################################################################
##
## jetifier-standalone start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/.." >/dev/null
APP_HOME="`pwd -P`"
THIRD_PARTY_DIR=$APP_HOME/..
cd "$SAVED" >/dev/null
APP_NAME="jetifier-standalone"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and JETIFIER_STANDALONE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/lib/jetifier-standalone.jar:$THIRD_PARTY_DIR/android_deps/libs/com_android_tools_build_jetifier_jetifier_processor/jetifier-processor-1.0.0-beta08.jar:$THIRD_PARTY_DIR/android_deps/libs/commons_cli_commons_cli/commons-cli-1.3.1.jar:$THIRD_PARTY_DIR/android_deps/libs/com_android_tools_build_jetifier_jetifier_core/jetifier-core-1.0.0-beta08.jar:$THIRD_PARTY_DIR/ow2_asm/lib/asm-util.jar:$THIRD_PARTY_DIR/ow2_asm/lib/asm-commons.jar:$THIRD_PARTY_DIR/ow2_asm/lib/asm-tree.jar:$THIRD_PARTY_DIR/ow2_asm/lib/asm.jar:$THIRD_PARTY_DIR/org_jdom_jdom2/jdom2-2.0.6.jar:$THIRD_PARTY_DIR/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib/kotlin-stdlib-1.3.41.jar:$THIRD_PARTY_DIR/gson/lib/gson.jar:$THIRD_PARTY_DIR/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_common/kotlin-stdlib-common-1.3.41.jar:$THIRD_PARTY_DIR/intellij/lib/annotations.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $JETIFIER_STANDALONE_OPTS -classpath "\"$CLASSPATH\"" com.android.tools.build.jetifier.standalone.Main "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"
This diff is collapsed.
......@@ -14,32 +14,24 @@ java_prebuilt("asm_tree_java") {
# Not "testonly" because //build/android/bytecode:java_bytecode_rewriter
# depends on it.
jar_path = "lib/asm-tree.jar"
deps = [
":asm_java",
]
deps = [ ":asm_java" ]
}
java_prebuilt("asm_analysis_java") {
testonly = true
jar_path = "lib/asm-analysis.jar"
deps = [
":asm_tree_java",
]
deps = [ ":asm_tree_java" ]
}
java_prebuilt("asm_commons_java") {
testonly = true
# Not "testonly" because of com_android_tools_build_jetifier_jetifier_processor
jar_path = "lib/asm-commons.jar"
deps = [
":asm_tree_java",
]
deps = [ ":asm_tree_java" ]
}
java_prebuilt("asm_util_java") {
# Not "testonly" because //build/android/bytecode:java_bytecode_rewriter
# depends on it.
jar_path = "lib/asm-util.jar"
deps = [
":asm_tree_java",
]
deps = [ ":asm_tree_java" ]
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment