aboutsummaryrefslogtreecommitdiff
path: root/java/java_test.go
Commit message (Collapse)AuthorAgeFilesLines
...
* | Stop using build/target -> build/make/target symlink am: 412160e1c9Dan Willemsen2019-04-101-2/+2
|\| | | | | | | | | | | am: 8862c76a68 Change-Id: I0dacd807818a58934d436724401335f2c8366c37
| * Stop using build/target -> build/make/target symlinkDan Willemsen2019-04-091-2/+2
| | | | | | | | | | | | | | Instead, fully specify build/make/target/... everywhere Test: treehugger Change-Id: I07ba0e9b0604919a271afd5133070616e1f404fc
* | Merge "Fix sdk_version: "system_current" when Platform_sdk_final=true" am: ↵Colin Cross2019-04-031-0/+3
|\| | | | | | | | | | | | | | | b007b2bde5 am: 8c3f398c6c am: 209edee425 Change-Id: I54ea846c9ac2b29354109755225db71dcdaa1527
| * Fix sdk_version: "system_current" when Platform_sdk_final=trueColin Cross2019-04-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | When PLATFORM_VERSION_CODENAME is set to REL Platform_sdk_final becomes true, which causes the return value of sdkVersionToNumber for "system_current" to a real version number instead of FutureApiLevel. This enables the check against PlatformSystemSdkVersions, which doesn't contain "current". Use the numeric value instead. Fixes: 129786845 Test: sdk_test.go Change-Id: If7cf211cc01c5fbf3e3ece3c3f604718a13d5a9b
* | Merge "Always package JNI libs into android_test modules" am: eae12cf400 am: ↵Colin Cross2019-03-271-0/+1
|\| | | | | | | | | | | | | | | f394fb0a27 am: b1af785608 Change-Id: I73d8243ae1bd428098f4f60b4a22c9b50785c481
| * Always package JNI libs into android_test modulesColin Cross2019-03-271-0/+1
| | | | | | | | | | | | | | | | | | android_test modules should always have native libraries packaged into the APK even when use_embedded_native_libs: false is set. Fixes: 129298278 Test: TestJNIPackaging Change-Id: Idfcc630f7c6579c1280a920b5d71808b0a502e06
* | Merge "Add override_android_app module type." am: e9665723da am: 9874d6abe6Jaewoong Jung2019-03-221-0/+2
|\| | | | | | | | | | | am: c3432e294e Change-Id: I28638a23c6140ae1775187a2afc61b15db97f487
| * Add override_android_app module type.Jaewoong Jung2019-03-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | This is a new implementation of overriding module types that makes use of local variants. With this, product owners can use PRODUCT_PACKAGES to decide which override module to include in their products. Bug: 122957760 Bug: 123640028 Test: app_test.go Change-Id: Ie65e97f615d006b6e9475193b6017ea9d97e8e97
* | Add dex_import module type am: 42be761ebd am: 66f3f2a01aColin Cross2019-03-201-0/+8
|\| | | | | | | | | | | am: 5d56651745 Change-Id: I6a96468ef78f5cd0c1fab335e691bcc19a8988dd
| * Add dex_import module typeColin Cross2019-03-201-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Add a module type for importing a prebuilt jar that contains classes.dex files. Test: m with a prebuilt jar that contains classes.dex files in PRODUCT_BOOT_JARS Test: java_test.go, dexpreopt_test.go, dexpreopt_bootjars_test.go Bug: 124804356 Bug: 125517186 Change-Id: I496848f9dca11f758d49b1cb68168cec7f8e1718
* | Merge "Add modules for converting java modules between host and device" am: ↵Colin Cross2019-03-051-0/+3
|\| | | | | | | | | | | | | | | e3ad4144db am: d5f25c7685 am: 3ce8fedd9a Change-Id: I09f01ae076b93cdec5b738eed00c2d7a40e5555d
| * Add modules for converting java modules between host and deviceColin Cross2019-03-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | java_device_for_host and java_host_for_device allow treating a device module as a host module and vice versa. They will be useful for converting layoutlib and robolectric to Soong, as these modules run device java code on the host. Bug: 117920228 Test: device_host_converter_test.go Change-Id: Ia9a371fb41a97bc16338097f3ce8b40099744167
* | Move some java test setup later am: c28bb0b8f9 am: 7e2b9c48caColin Cross2019-03-041-2/+6
|\| | | | | | | | | | | am: 7cb6f9e601 Change-Id: Ib0924d35bc9cd844a071e5f8729f5e2f7b8b6745
| * Move some java test setup laterColin Cross2019-03-051-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Move ctx.Register() from testContext() to run() so that tests can register more singletons before the env singleton is registered. Any singletons registered after the env singleton will hit an error if they attempt to read an environment variable. Move setDexpreoptTestGlobalConfig from TestConfig to run() so that a test can set their own custom config after TestConfig but before run(). Test: All Soong tests Change-Id: Iec47f4b7898736f583cbd6bd53e4d02a035f4fb2
* | Merge "Revert "Add override_module."" am: ef36053829 am: 4ab2e63974Jaewoong Jung2019-02-281-2/+0
|\| | | | | | | | | | | am: d26cc522ac Change-Id: Iab70e8d689eea96831afd4f3b696122b98c99d9b
| * Revert "Add override_module."Jaewoong Jung2019-02-281-2/+0
| | | | | | | | | | | | | | | | This reverts commit aa65e17016152d0d73cd10ab3987bc3bd5c2ef91. Reason for revert: Not compatible with PRODUCT_PACKAGES, and so has very limited use. Change-Id: Ib141d3984a6f12bb50989e66037494c466b066f1
* | Merge "Add override_module." am: b709575a75 am: e8eaf4608dJaewoong Jung2019-02-271-0/+2
|\| | | | | | | | | | | am: b44bb0896b Change-Id: I4c8faef56835a1e7d334f8dade5623c9ea07df3e
| * Add override_module.Jaewoong Jung2019-02-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | This new module type replaces the inherit-package function in make by allowing developers to override the name, the certificate, and the manifest package name of an android_app module. Bug: 122957760 Fixes: 123640028 Test: app_test.go + BrowserGoogle Change-Id: Iefe447e7078b25039233221361ef95c83a29973a
| * Add java/testing.go for sysprop_test.goColin Cross2019-02-161-58/+2
| | | | | | | | | | | | | | | | | | Share more of the setup code for java tests to sysprop_tests.go. Test: java_test.go, sysprop_test.go Change-Id: I0e3b287bf188c432d995a9a91a18ebef12aa47d1 Merged-In: I0e3b287bf188c432d995a9a91a18ebef12aa47d1 (cherry picked from commit b19745363f3cc59ffd46c664997602f250892d4d)
* | Add java/testing.go for sysprop_test.goColin Cross2019-02-151-59/+2
| | | | | | | | | | | | | | Share more of the setup code for java tests to sysprop_tests.go. Test: java_test.go, sysprop_test.go Change-Id: I0e3b287bf188c432d995a9a91a18ebef12aa47d1
* | Create sysprop_library soong module am: c0907f191a am: 92053b977eInseob Kim2019-02-131-4/+4
|\| | | | | | | | | | | am: 751a2cb98a Change-Id: Ie9976968934c4231492af4ad4cbbcfe38790f040
| * Create sysprop_library soong moduleInseob Kim2019-02-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A newly introduced sysprop_library soong module will generate a java_sdk_library and a cc_library from .sysprop description files. Both Java modules and C++ modules can link against sysprop_library module, thus giving consistency for using generated sysprop API. As Java controls accessibility of Internal / System properties with @hide and @SystemApi, 2 different header files will be created. And build system will selectively expose depending on the property owner and the place where the client libraries go into. Bug: 80125326 Bug: 122170616 Test: 1) Create sysprop_library module. Test: 2) Create empty txt files under prebuilts/sdk. Test: 3) Create api directory, make update-api, and see changes. Test: 4) Try to link against sysprop_library with various clients. Test: 5) Soc_specific, Device_specific, Product_specific, recovery flags work as intended. Change-Id: I78dc5780ccfbb4b69e5c61dec26b94e92d43c333
* | resolve merge conflicts of dec157bd6c01da7817ac69a01d75d25ee7150848 to masterColin Cross2019-02-041-1/+1
|\| | | | | | | | | | | Bug: None Test: treehugger Change-Id: I701d7a4ee893eb4113a48eaee9930eceec478a29
| * Replace *[]string with []string in product variablesColin Cross2019-02-011-1/+1
| | | | | | | | | | | | | | | | There is no need for *[]string, []string can already hold a nil value to specify "not set". Test: all soong tests Change-Id: I85a51b042c12aee1565a9287d62924feeeafd486
* | Add updatable_media_stubs to prevent private API use.Insun Kang2019-01-311-1/+2
|/ | | | | | Bug: 123551910, Bug: 123253805 Test: build Change-Id: Id46ff05fa01db726d613ee2299b0c27921c88aae
* Enable certificate overrides with product vars.Jaewoong Jung2019-01-241-0/+4
| | | | | | | | | | | Currently it is only for android_app, though it can be easily ported to apex. The make-side change will be made later, along with a real application. Bug: 122957760 Test: app_test.go Change-Id: I41f0be84f8b9f93e9518a16160e10eaa649388cd
* Replace annotation_processors with pluginsColin Cross2019-01-231-0/+1
| | | | | | | | | | | | | | | | | Follow bazel's modules for annotation processors by introducing a java_plugin module type that can contain extra metadata about the annotation processor, the processor class and a flag to specify if the annotation processor is compatible with the turbine optimization. Deprecate the annotation_processors property, which took a list of java_library_host modules, in favor of the plugins property, which takes a list of java_plugin modules. The annotation_processors property will be removed once all uses have been replaced with plugins. Bug: 77284273 Test: plugin_test.go Test: m caliper Change-Id: I37c1e80eba71ae2d6a06199fb102194a51994989
* Pass annotation processors to kotlincColin Cross2019-01-221-0/+1
| | | | | | | | | | Enable the kotlin-annotation-processing plugin and pass annotation processors to it. Bug: 122251693 Test: m checkbuild Test: TestKapt in kotlin_test.go Change-Id: I841df454beaaa7edd263eea714ca0d958a03c9de
* Move kotlin to it's own fileColin Cross2019-01-221-62/+0
| | | | | | | | | kapt is going to make kotlin a little more complicated, move the rules and tests to their own files. Bug: 122251693 Test: m checkbuild Change-Id: Ieed78b97995ced210b710bd50c357514cc8e3bc6
* Enable arch variant properties in prebuilt_etc.Jaewoong Jung2019-01-171-1/+1
| | | | | | Bug: 122332178 Test: Soong unit tests + TreeHugger. Change-Id: Ia8fab0add09478599398e8cbb703debc39f658f6
* Support core librarySundong Ahn2019-01-161-3/+2
| | | | | | | | | | | | | | | To support core library, "Openjdk9", "No_standard_libs" and metalava properties are added to java_sdk_library. If core_lib is true, dist paths are changed to apistubs/core/.... impl library name is changed to {module_name}.jar instead of {module_name}.impl.jar Bug: 110404779 Test: m -j Change-Id: Ieb6248ea714b4260333d8bf61573d4f3413f7f24 Merged-In: Ieb6248ea714b4260333d8bf61573d4f3413f7f24 (cherry picked from commit af4907fed798aa736d3d20f5439ba87be7ab0f10)
* Use latest SDK version for current in PDK buildsColin Cross2019-01-101-0/+4
| | | | | | | | | PDK builds need to use the latest SDK version instead of "current" to match the behavior of Make. Bug: 118634643 Test: sdk_test.go Change-Id: Ice10d0ccb4066f27ce5839fc96a4026510057121
* Split out sdk.go from java.goColin Cross2019-01-101-238/+0
| | | | | | | | Split out SDK handling functions from java.go to sdk.go and tests from java_test.go to sdk.go. Test: sdk_test.go Change-Id: I83ef48cbe5230572c1d4ecc0e89021d2f7c71b76
* Add dexpreopt enabled testsColin Cross2019-01-051-0/+3
| | | | | | | Add tests that verify when dexpreopt is enabled or disabled. Test: dexpreopt_test.go Change-Id: Ideba9c0dac30eb31e7ae29e46d1d1590202b8369
* Add buildDir to java patch-module paths.Jaewoong Jung2019-01-041-0/+62
| | | | | | | | | This solves a problem where javac fails to find patch-module targets when a build diretory is not under the project root. Bug: 117770838 Test: java_test.go + manual build Change-Id: If70d0d388a3f6c87b3f78a927df2063616d50c8a
* Enable kotlinc flags in blueprint filesZoran Jovanovic2018-11-141-0/+61
| | | | | | | | | | | | | | | Add support for adding kotlinc files in the module. Some flags are unnecessary as they are added by default (-no-jdk and -no-stdlib), or are not needed on an Android build (-include-runtime), or may conflict with the build (-kotlin-home and -Xintellij-plugin-root), so the error stops the build if they are added. Test: part of java/java_test.go Change-Id: If3b2777062daaa490a20c014e9b1bb4b1cb0a8df Signed-off-by: Zoran Jovanovic <zoran.jovanovic@sony.com>
* Remove reference to core-oj/core-libart, etc.Neil Fuller2018-10-181-6/+0
| | | | | | | | | | Various "core library" targets are no longer used in soong so the tests do not have to create fake build rules for them. Bug: 113148576 Test: make droid Change-Id: Ic754b4195f1597fb599e496c08940231ecbb13f7
* Build platform with core library stubs by defaultNeil Fuller2018-10-121-7/+9
| | | | | | | | | | | | | | | Switch targets that don't explicitly specify an sdk_version to using core.platform.api.stubs instead of the core library implementations. Note: the old core-oj target contained the source for core-lambda-stubs too. The new core.platform.api.stubs does not contain core-lambda-stubs so it is explicitly added to the boot classpath list as part of the switch over. Bug: 113148576 Test: build Change-Id: I689d2127f6b69b4a7034fb96f3d9cf714f801794
* Include all core libs in default boot classpathNeil Fuller2018-10-101-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | To migrate the default compilation over to using "core platform api" stubs we need to make the "before" state as close to the "after" state as possible. The stubs will include all "core libraries" so it makes sense to include those that contribute to the "core platform api": okhttp, bouncycastle and conscrypt. (apache-xml is not included because it doesn't contribute to the core platform API). After this change all explicit dependencies to okhttp, bouncycastle and conscrypt in situations where the default boot classpath is used can be removed. A knock-on of this change is that the conscrypt, bouncycastle and okhttp targets need to be adjusted to explicitly depend on core-oj / core-libart with no_standard_libs: true to avoid a cycle. Bug: 113148576 Test: treehugger Change-Id: I1677af8d9d48fd026874ebce4c864f39ec1a5a3d
* Add support for JNI libraries to android_app modulesColin Cross2018-10-081-2/+15
| | | | | | | | | | | Make android_app modules a MultiTargets module, which means the common variant will have a list of Targets that it needs to handle. Collect JNI libraries for each Target, and package them into or alongside the APK. Bug: 80095087 Test: app_test.go Change-Id: Iabd3921e1d4c4b4cfcc7e131a0b0d9ab83b0ebbb
* Allow exclude_java_resources to affect java_resource_dirsColin Cross2018-09-131-36/+24
| | | | | | | Allow excluding files from directory globbed by java_resource_dirs. Test: java_test.go Change-Id: I9922842248be1a386ab111a5187608438638ffb1
* Revert "Add support for renamed kotlin stdlib."Colin Cross2018-08-291-14/+0
| | | | | | | | This reverts commit 66c0c4067f8a70847eaa37273671aa8fe4203f1d. Bug: 112674805 Test: m checkbuild Change-Id: I687888136b570f080b57af352af0130355acd216
* Track changes to add core-simple to the boot cpNeil Fuller2018-08-281-2/+3
| | | | | | | | See the change in build/make for details. Bug: 113148576 Test: make checkbuild / Treehugger Change-Id: I6f7901642c6b907b1e8e9dd31ced3bf1ea6dfd4d
* Don't pass resources to r8Colin Cross2018-08-161-1/+1
| | | | | | | | | | R8 complains when it gets dex files in the input jar, but some tests use dex files or dex jars as resources. Keep resources separate from classes until after r8 has been run. Test: java_test.go Test: m checkbuild Change-Id: I1d9164d60d6b054ebb138648da07d80ee769177f
* Fix the issue that changing merge_annotations_dir doesn't trigger buildNan Zhang2018-08-011-1/+1
| | | | | | | | | | | | | | | | We don't have API exported to glob any dir outside of current module. Any files deps outside of current module should be either a filegroup/filegroup or a customized module. We already have similar customized module to track droiddoc-template, so rename it to be more generic so that it can be used by merge_annotations_dir also. Bug: b/111916275, b/70351683 Test: touch manual/android/support/design/widget/annotations.xml, and m -j metalava-api-stubs-docs, and check the built output srcjar. Change-Id: I75420ddba69785e46bea75b6dd3f189be7cfe5ad
* Add exclude_files and exclude_dirs properties to java_importColin Cross2018-07-121-5/+6
| | | | | | | | | | | | | | Prebuilt jars sometime contain files that we don't want. In Make we would delete everything in META-INF when importing jars, but that caused problems when there were necessary files in there, so we added LOCAL_DONT_DELETE_JAR_META_INF. Soong does the opposite, keeping everything by default. Add properties to allow explicitly stripping unwanted files instead. Bug: 111389216 Test: m checkbuild Change-Id: I6d07f519ebc7d0e1bf0af93416bb569e3c2b1500
* Don't install java libraries by defaultColin Cross2018-07-111-1/+1
| | | | | | | | | | | | | | | | | Very few java libraries need to be installed, most are statically included in other modules. Device modules that are not installed also don't need to be dexed, saving checkbuild time. Change the default for java_library to not be installed, and allow libraries that should be installed to specify installed: true. This makes java_libary and java_library_static identical. It also simplifies some corner cases when converting from Make to Soong if a module is built for the host (which doesn't differentiate between static and non-static/installable) and statically for the device, which couldn't be represented in a single java_library in soong. Bug: 110885583 Test: m checkbuild, compare presubmit target files Change-Id: Idc0841c39a17cebd7bac3559c9408596d167a393
* Add api_dirs property and use module name as prefixSundong Ahn2018-06-251-1/+1
| | | | | | | | | | | | | | | The soong connect the prebuilt library according to LOCAL_SDK_VERSION. But some sdk libraries has diffrent version policy with LOCAL_SDK_VERSION. For this, we need to support direct link to the prebuilt library instead of creating a new LOCAL_XXX_SDK_VERSION. So, The base module name is used as the prefix for the prebuilt module name. Remove the empty file check to support the absence of a prebuilt library and add api_dirs property Bug:77577799 Test: make -j Change-Id: I1086977d26e4ddfd62e290637126d44e1b248bac
* Export SDK library namesJiyong Park2018-06-201-0/+15
| | | | | | | | | | | | | | java_library, java_import, and android_library export SDK library names that they are using directly or indirectly via its dependencies. When building an apk, the manifest fixer uses the SDK lib names to automatically add <uses-library> tags. The SDK lib names are exported to the make world via LOCAL_EXPORT_SDK_LIBRARIES flag. Bug: 77575606 Test: m -j Change-Id: I4fe606eb7ed23843c58eebe6a324405fe1da34e5
* Add core-lambda-stubs to classpathColin Cross2018-05-301-7/+39
| | | | | | | | | | | | | | | | Add core-lambda-stubs to the bootclasspath for modules with no sdk_version or with sdk_version: "current", and to the classpath for modules that specify a specific sdk_version number. Use the prebuilt sdk-core-lambda-stubs when using a prebuilt SDK. Fixes compiling modules with lambdas against the SDK. This reapplies I5e700f2dd86f1a6b84b7a55dd9bfe21a448d3fb6 with fixes and tests for unbundled builds. Bug: 80428539 Test: java_test.go Change-Id: Ib7aaeebb93137270d7336a7293a08ed7064a3184