Merge "Remove ANDROID_BUILD_TOP from intelliJ path variables. [DO NOT MERGE]" into klp-modular-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
2d77fad26b
4
tools/layoutlib/.idea/libraries/asm_4_0.xml
generated
4
tools/layoutlib/.idea/libraries/asm_4_0.xml
generated
@@ -1,11 +1,11 @@
|
|||||||
<component name="libraryTable">
|
<component name="libraryTable">
|
||||||
<library name="asm-4.0">
|
<library name="asm-4.0">
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="jar://$ANDROID_BUILD_TOP$/prebuilts/misc/common/asm/asm-4.0.jar!/" />
|
<root url="jar://$PROJECT_DIR$/../../../../prebuilts/misc/common/asm/asm-4.0.jar!/" />
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="jar://$ANDROID_BUILD_TOP$/prebuilts/misc/common/asm/src.zip!/" />
|
<root url="jar://$PROJECT_DIR$/../../../../prebuilts/misc/common/asm/src.zip!/" />
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
</library>
|
</library>
|
||||||
</component>
|
</component>
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
<component name="libraryTable">
|
<component name="libraryTable">
|
||||||
<library name="framework.jar">
|
<library name="framework.jar">
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="jar://$ANDROID_BUILD_TOP$/out/host/common/obj/JAVA_LIBRARIES/temp_layoutlib_intermediates/javalib.jar!/" />
|
<root url="jar://$PROJECT_DIR$/../../../../out/host/common/obj/JAVA_LIBRARIES/temp_layoutlib_intermediates/javalib.jar!/" />
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="file://$ANDROID_BUILD_TOP$/frameworks/base/core/java" />
|
<root url="file://$PROJECT_DIR$/../../core/java" />
|
||||||
<root url="file://$ANDROID_BUILD_TOP$/frameworks/base/graphics/java" />
|
<root url="file://$PROJECT_DIR$/../../graphics/java" />
|
||||||
<root url="file://$ANDROID_BUILD_TOP$/libcore/luni/src/main/java" />
|
<root url="file://$PROJECT_DIR$/../../../../libcore/luni/src/main/java" />
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
</library>
|
</library>
|
||||||
</component>
|
</component>
|
||||||
4
tools/layoutlib/.idea/libraries/guava.xml
generated
4
tools/layoutlib/.idea/libraries/guava.xml
generated
@@ -1,11 +1,11 @@
|
|||||||
<component name="libraryTable">
|
<component name="libraryTable">
|
||||||
<library name="guava">
|
<library name="guava">
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="jar://$ANDROID_BUILD_TOP$/out/host/common/obj/JAVA_LIBRARIES/guavalib_intermediates/javalib.jar!/" />
|
<root url="jar://$PROJECT_DIR$/../../../../out/host/common/obj/JAVA_LIBRARIES/guavalib_intermediates/javalib.jar!/" />
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="file://$ANDROID_BUILD_TOP$/external/guava/guava/src" />
|
<root url="file://$PROJECT_DIR$/../../../../external/guava/guava/src" />
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
</library>
|
</library>
|
||||||
</component>
|
</component>
|
||||||
2
tools/layoutlib/.idea/libraries/icu4j.xml
generated
2
tools/layoutlib/.idea/libraries/icu4j.xml
generated
@@ -1,7 +1,7 @@
|
|||||||
<component name="libraryTable">
|
<component name="libraryTable">
|
||||||
<library name="icu4j">
|
<library name="icu4j">
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="jar://$ANDROID_BUILD_TOP$/prebuilts/misc/common/icu4j/icu4j.jar!/" />
|
<root url="jar://$PROJECT_DIR$/../../../../prebuilts/misc/common/icu4j/icu4j.jar!/" />
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC>
|
<JAVADOC>
|
||||||
<root url="http://icu-project.org/apiref/icu4j50rc/" />
|
<root url="http://icu-project.org/apiref/icu4j50rc/" />
|
||||||
|
|||||||
4
tools/layoutlib/.idea/libraries/kxml2_2_3_0.xml
generated
4
tools/layoutlib/.idea/libraries/kxml2_2_3_0.xml
generated
@@ -1,11 +1,11 @@
|
|||||||
<component name="libraryTable">
|
<component name="libraryTable">
|
||||||
<library name="kxml2-2.3.0">
|
<library name="kxml2-2.3.0">
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="jar://$ANDROID_BUILD_TOP$/prebuilts/misc/common/kxml2/kxml2-2.3.0.jar!/" />
|
<root url="jar://$PROJECT_DIR$/../../../../prebuilts/misc/common/kxml2/kxml2-2.3.0.jar!/" />
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="file://$ANDROID_BUILD_TOP$/libcore/xml/src/main/java" />
|
<root url="file://$PROJECT_DIR$/../../../../libcore/xml/src/main/java" />
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
</library>
|
</library>
|
||||||
</component>
|
</component>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<component name="libraryTable">
|
<component name="libraryTable">
|
||||||
<library name="layoutlib_api-prebuilt">
|
<library name="layoutlib_api-prebuilt">
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="jar://$ANDROID_BUILD_TOP$/prebuilts/misc/common/layoutlib_api/layoutlib_api-prebuilt.jar!/" />
|
<root url="jar://$PROJECT_DIR$/../../../../prebuilts/misc/common/layoutlib_api/layoutlib_api-prebuilt.jar!/" />
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<component name="libraryTable">
|
<component name="libraryTable">
|
||||||
<library name="ninepatch-prebuilt">
|
<library name="ninepatch-prebuilt">
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="jar://$ANDROID_BUILD_TOP$/prebuilts/misc/common/ninepatch/ninepatch-prebuilt.jar!/" />
|
<root url="jar://$PROJECT_DIR$/../../../../prebuilts/misc/common/ninepatch/ninepatch-prebuilt.jar!/" />
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<root url="file://$PROJECT_DIR$" />
|
<root url="file://$PROJECT_DIR$" />
|
||||||
</ANNOTATIONS>
|
</ANNOTATIONS>
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="jar://$ANDROID_BUILD_TOP$/prebuilts/misc/common/tools-common/tools-common-prebuilt.jar!/" />
|
<root url="jar://$PROJECT_DIR$/../../../../prebuilts/misc/common/tools-common/tools-common-prebuilt.jar!/" />
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<option name="MAIN_CLASS_NAME" value="" />
|
<option name="MAIN_CLASS_NAME" value="" />
|
||||||
<option name="METHOD_NAME" value="" />
|
<option name="METHOD_NAME" value="" />
|
||||||
<option name="TEST_OBJECT" value="package" />
|
<option name="TEST_OBJECT" value="package" />
|
||||||
<option name="VM_PARAMETERS" value="-ea -Dplatform.dir="$ANDROID_BUILD_TOP$/out/host/linux-x86/sdk/sdk/android-sdk_eng.deepanshu_linux-x86/platforms/android-L" -Dtest_res.dir="$PROJECT_DIR$/bridge/tests/res"" />
|
<option name="VM_PARAMETERS" value="-ea -Dtest_res.dir="$PROJECT_DIR$/bridge/tests/res"" />
|
||||||
<option name="PARAMETERS" value="" />
|
<option name="PARAMETERS" value="" />
|
||||||
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
|
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
|
||||||
<option name="ENV_VARIABLES" />
|
<option name="ENV_VARIABLES" />
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<option name="MAIN_CLASS_NAME" value="com.android.tools.layoutlib.create.Main" />
|
<option name="MAIN_CLASS_NAME" value="com.android.tools.layoutlib.create.Main" />
|
||||||
<option name="VM_PARAMETERS" value="" />
|
<option name="VM_PARAMETERS" value="" />
|
||||||
<option name="PROGRAM_PARAMETERS" value="out/host/common/obj/JAVA_LIBRARIES/temp_layoutlib_intermediates/javalib.jar out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.jar out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes.jar out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes.jar out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/javalib.jar" />
|
<option name="PROGRAM_PARAMETERS" value="out/host/common/obj/JAVA_LIBRARIES/temp_layoutlib_intermediates/javalib.jar out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.jar out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes.jar out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes.jar out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/javalib.jar" />
|
||||||
<option name="WORKING_DIRECTORY" value="file://$ANDROID_BUILD_TOP$/" />
|
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../../../../" />
|
||||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
|
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
|
||||||
<option name="ALTERNATIVE_JRE_PATH" value="1.6" />
|
<option name="ALTERNATIVE_JRE_PATH" value="1.6" />
|
||||||
<option name="ENABLE_SWING_INSPECTOR" value="false" />
|
<option name="ENABLE_SWING_INSPECTOR" value="false" />
|
||||||
|
|||||||
2
tools/layoutlib/.idea/vcs.xml
generated
2
tools/layoutlib/.idea/vcs.xml
generated
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="VcsDirectoryMappings">
|
<component name="VcsDirectoryMappings">
|
||||||
<mapping directory="$ANDROID_BUILD_TOP$/frameworks/base" vcs="Git" />
|
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
|
|
||||||
|
|||||||
@@ -34,11 +34,11 @@
|
|||||||
<orderEntry type="module-library" scope="TEST">
|
<orderEntry type="module-library" scope="TEST">
|
||||||
<library>
|
<library>
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="jar://$ANDROID_BUILD_TOP$/prebuilts/misc/common/sdk-common/sdk-common.jar!/" />
|
<root url="jar://$MODULE_DIR$/../../../../../prebuilts/misc/common/sdk-common/sdk-common.jar!/" />
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="jar://$ANDROID_BUILD_TOP$/prebuilts/misc/common/sdk-common/sdk-common-sources.jar!/" />
|
<root url="jar://$MODULE_DIR$/../../../../../prebuilts/misc/common/sdk-common/sdk-common-sources.jar!/" />
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
</library>
|
</library>
|
||||||
</orderEntry>
|
</orderEntry>
|
||||||
|
|||||||
@@ -104,9 +104,61 @@ public class Main {
|
|||||||
return platformDir;
|
return platformDir;
|
||||||
}
|
}
|
||||||
// System Property not set. Try to find the directory in the build directory.
|
// System Property not set. Try to find the directory in the build directory.
|
||||||
String out = System.getenv("ANDROID_HOST_OUT");
|
String androidHostOut = System.getenv("ANDROID_HOST_OUT");
|
||||||
if (out == null || out.isEmpty() || !new File(out).isDirectory()) {
|
if (androidHostOut != null) {
|
||||||
// Can't find the out directory.
|
platformDir = getPlatformDirFromHostOut(new File(androidHostOut));
|
||||||
|
if (platformDir != null) {
|
||||||
|
return platformDir;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String workingDirString = System.getProperty("user.dir");
|
||||||
|
File workingDir = new File(workingDirString);
|
||||||
|
// Test if workingDir is android checkout root.
|
||||||
|
platformDir = getPlatformDirFromRoot(workingDir);
|
||||||
|
if (platformDir != null) {
|
||||||
|
return platformDir;
|
||||||
|
}
|
||||||
|
// Test if workingDir is platform/frameworks/base/tools/layoutlib. That is, root should be
|
||||||
|
// workingDir/../../../../ (4 levels up)
|
||||||
|
File currentDir = workingDir;
|
||||||
|
for (int i = 0; i < 4; i++) {
|
||||||
|
if (currentDir != null) {
|
||||||
|
currentDir = currentDir.getParentFile();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return currentDir == null ? null : getPlatformDirFromRoot(currentDir);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String getPlatformDirFromRoot(File root) {
|
||||||
|
if (!root.isDirectory()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
File out = new File(root, "out");
|
||||||
|
if (!out.isDirectory()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
File host = new File(out, "host");
|
||||||
|
if (!host.isDirectory()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
File[] hosts = host.listFiles(new FileFilter() {
|
||||||
|
@Override
|
||||||
|
public boolean accept(File path) {
|
||||||
|
return path.isDirectory() && (path.getName().startsWith("linux-") || path.getName()
|
||||||
|
.startsWith("darwin-"));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
for (File hostOut : hosts) {
|
||||||
|
String platformDir = getPlatformDirFromHostOut(hostOut);
|
||||||
|
if (platformDir != null) {
|
||||||
|
return platformDir;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String getPlatformDirFromHostOut(File out) {
|
||||||
|
if (!out.isDirectory()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
File sdkDir = new File(out, "sdk" + File.separator + "sdk");
|
File sdkDir = new File(out, "sdk" + File.separator + "sdk");
|
||||||
@@ -117,7 +169,7 @@ public class Main {
|
|||||||
File[] possibleSdks = sdkDir.listFiles(new FileFilter() {
|
File[] possibleSdks = sdkDir.listFiles(new FileFilter() {
|
||||||
@Override
|
@Override
|
||||||
public boolean accept(File path) {
|
public boolean accept(File path) {
|
||||||
return path.isDirectory() && path.getAbsolutePath().contains("android-sdk");
|
return path.isDirectory() && path.getName().contains("android-sdk");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
for (File possibleSdk : possibleSdks) {
|
for (File possibleSdk : possibleSdks) {
|
||||||
|
|||||||
Reference in New Issue
Block a user