Lines Matching refs:j

46 		func(j *Library) android.Path {
47 implementationJars := j.ImplementationAndResourcesJars()
49 panic(fmt.Errorf("there must be only one implementation jar from %q", j.Name()))
89 func (j *Module) CheckStableSdkVersion() error {
90 sdkVersion := j.sdkVersion()
97 func (j *Module) checkSdkVersions(ctx android.ModuleContext) {
98 if j.RequiresStableAPIs(ctx) {
114 checkLinkType(ctx, j, module.(linkTypeContext), tag.(dependencyTag))
120 func (j *Module) checkPlatformAPI(ctx android.ModuleContext) {
122 usePlatformAPI := proptools.Bool(j.deviceProperties.Platform_apis)
499 func (j *Module) addHostProperties() {
500 j.AddProperties(
501 &j.properties,
502 &j.protoProperties,
506 func (j *Module) addHostAndDeviceProperties() {
507 j.addHostProperties()
508 j.AddProperties(
509 &j.deviceProperties,
510 &j.dexpreoptProperties,
511 &j.linter.properties,
515 func (j *Module) OutputFiles(tag string) (android.Paths, error) {
518 return append(android.Paths{j.outputFile}, j.extraOutputFiles...), nil
520 return android.Paths{j.implementationAndResourcesJar}, nil
522 return android.Paths{j.proguardDictionary}, nil
554 func (j *Module) XrefJavaFiles() android.Paths {
555 return j.kytheFiles
659 func (j *Module) shouldInstrument(ctx android.BaseModuleContext) bool {
660 return j.properties.Instrument &&
665 func (j *Module) shouldInstrumentStatic(ctx android.BaseModuleContext) bool {
666 return j.shouldInstrument(ctx) &&
671 func (j *Module) shouldInstrumentInApex(ctx android.BaseModuleContext) bool {
676 if android.DirectlyInAnyApex(ctx, ctx.ModuleName()) && !isJacocoAgent && !j.IsForPlatform() {
686 func (j *Module) sdkVersion() sdkSpec {
687 return sdkSpecFrom(String(j.deviceProperties.Sdk_version))
690 func (j *Module) systemModules() string {
691 return proptools.String(j.deviceProperties.System_modules)
694 func (j *Module) minSdkVersion() sdkSpec {
695 if j.deviceProperties.Min_sdk_version != nil {
696 return sdkSpecFrom(*j.deviceProperties.Min_sdk_version)
698 return j.sdkVersion()
701 func (j *Module) targetSdkVersion() sdkSpec {
702 if j.deviceProperties.Target_sdk_version != nil {
703 return sdkSpecFrom(*j.deviceProperties.Target_sdk_version)
705 return j.sdkVersion()
708 func (j *Module) MinSdkVersion() string {
709 return j.minSdkVersion().version.String()
712 func (j *Module) AvailableFor(what string) bool {
713 if what == android.AvailableToPlatform && Bool(j.deviceProperties.Hostdex) {
719 return j.ApexModuleBase.AvailableFor(what)
722 func (j *Module) deps(ctx android.BottomUpMutatorContext) {
724 j.linter.deps(ctx)
726 sdkDep := decodeSdkDep(ctx, sdkContext(j))
731 if j.deviceProperties.EffectiveOptimizeEnabled() && sdkDep.hasStandardLibs() {
734 if j.deviceProperties.EffectiveOptimizeEnabled() && sdkDep.hasFrameworkLibs() {
764 linkType, _ := j.getLinkType(ctx.ModuleName())
774 ctx.AddVariationDependencies(nil, libTag, rewriteSyspropLibs(j.properties.Libs, "libs")...)
775 …ctx.AddVariationDependencies(nil, staticLibTag, rewriteSyspropLibs(j.properties.Static_libs, "stat…
777 …ctx.AddFarVariationDependencies(ctx.Config().BuildOSCommonTarget.Variations(), pluginTag, j.proper…
778 …endencies(ctx.Config().BuildOSCommonTarget.Variations(), exportedPluginTag, j.properties.Exported_…
780 android.ProtoDeps(ctx, &j.protoProperties)
781 if j.hasSrcExt(".proto") {
782 protoDeps(ctx, &j.protoProperties)
785 if j.hasSrcExt(".kt") {
790 if len(j.properties.Plugins) > 0 {
800 j.properties.Instrument = true
802 } else if j.shouldInstrumentStatic(ctx) {
817 func (j *Module) hasSrcExt(ext string) bool {
818 return hasSrcExt(j.properties.Srcs, ext)
821 func (j *Module) aidlFlags(ctx android.ModuleContext, aidlPreprocess android.OptionalPath,
824 aidlIncludes := android.PathsForModuleSrc(ctx, j.deviceProperties.Aidl.Local_include_dirs)
826 android.PathsForModuleSrc(ctx, j.deviceProperties.Aidl.Export_include_dirs)...)
828 android.PathsForSource(ctx, j.deviceProperties.Aidl.Include_dirs)...)
840 if len(j.exportAidlIncludeDirs) > 0 {
841 flags = append(flags, android.JoinWithPrefix(j.exportAidlIncludeDirs.Strings(), "-I"))
853 if Bool(j.deviceProperties.Aidl.Generate_traces) {
857 if Bool(j.deviceProperties.Aidl.Generate_get_transaction_name) {
1004 func (j *Module) collectDeps(ctx android.ModuleContext) deps {
1008 sdkDep := decodeSdkDep(ctx, sdkContext(j))
1025 j.exportedSdkLibs = append(j.exportedSdkLibs, j.OptionalImplicitSdkLibrary()...)
1044 deps.classpath = append(deps.classpath, dep.SdkHeaderJars(ctx, j.sdkVersion())...)
1046 j.exportedSdkLibs = append(j.exportedSdkLibs, dep.OptionalImplicitSdkLibrary()...)
1057 j.exportedSdkLibs = append(j.exportedSdkLibs, dep.ExportedSdkLibs()...)
1069 j.exportedSdkLibs = append(j.exportedSdkLibs, dep.ExportedSdkLibs()...)
1089 j.exportedPluginJars = append(j.exportedPluginJars, plugin.ImplementationAndResourcesJars()...)
1091j.exportedPluginClasses = append(j.exportedPluginClasses, *plugin.pluginProperties.Processor_class)
1144 j.exportedSdkLibs = android.FirstUniqueStrings(j.exportedSdkLibs)
1213 func (j *Module) collectBuilderFlags(ctx android.ModuleContext, deps deps) javaBuilderFlags {
1218 flags.javaVersion = getJavaVersion(ctx, String(j.properties.Java_version), sdkContext(j))
1221 javacFlags := j.properties.Javacflags
1223 javacFlags = append(javacFlags, j.properties.Openjdk9.Javacflags...)
1241 errorProneFlags = append(errorProneFlags, j.properties.Errorprone.Javacflags...)
1258 decodeSdkDep(ctx, sdkContext(j)).hasStandardLibs() {
1276 if Bool(j.properties.Use_tools_jar) {
1282 if j.properties.Patch_module != nil && flags.javaVersion.usesJavaModules() {
1291 …javacFlags = append(javacFlags, "--patch-module="+String(j.properties.Patch_module)+"="+patchPaths)
1298 flags.aidlFlags, flags.aidlDeps = j.aidlFlags(ctx, deps.aidlPreprocess, deps.aidlIncludeDirs)
1309 func (j *Module) compile(ctx android.ModuleContext, aaptSrcJar android.Path) {
1310j.exportAidlIncludeDirs = android.PathsForModuleSrc(ctx, j.deviceProperties.Aidl.Export_include_di…
1312 deps := j.collectDeps(ctx)
1313 flags := j.collectBuilderFlags(ctx, deps)
1316 j.properties.Srcs = append(j.properties.Srcs, j.properties.Openjdk9.Srcs...)
1318 srcFiles := android.PathsForModuleSrcExcludes(ctx, j.properties.Srcs, j.properties.Exclude_srcs)
1320 flags = protoFlags(ctx, &j.properties, &j.protoProperties, flags)
1323 kotlinCommonSrcFiles := android.PathsForModuleSrcExcludes(ctx, j.properties.Common_srcs, nil)
1328 srcFiles = j.genSources(ctx, srcFiles, flags)
1336 if j.properties.Jarjar_rules != nil {
1337 j.expandJarjarRules = android.PathForModuleSrc(ctx, *j.properties.Jarjar_rules)
1353 j.expandIDEInfoCompiledSrcs = append(j.expandIDEInfoCompiledSrcs, uniqueSrcFiles.Strings()...)
1359 kotlincFlags := j.properties.Kotlincflags
1380j.expandIDEInfoCompiledSrcs = append(j.expandIDEInfoCompiledSrcs, srcFiles.FilterByExt(".kt").Stri…
1381j.expandIDEInfoCompiledSrcs = append(j.expandIDEInfoCompiledSrcs, kotlinCommonSrcFiles.Strings()..…
1412 if BoolDefault(j.properties.Static_kotlin_stdlib, true) {
1420 j.compiledJavaSrcs = uniqueSrcFiles
1421 j.compiledSrcJars = srcJars
1426 if j.properties.Javac_shard_size != nil && *(j.properties.Javac_shard_size) > 0 {
1434 headerJarFileWithoutJarjar, j.headerJarFile =
1435 j.compileJavaHeader(ctx, uniqueSrcFiles, srcJars, deps, flags, jarName, kotlinJars)
1455 shardSize := int(*(j.properties.Javac_shard_size))
1460 classes := j.compileJavaClasses(ctx, jarName, idx, shardSrc,
1466 classes := j.compileJavaClasses(ctx, jarName, len(shardSrcs),
1471 classes := j.compileJavaClasses(ctx, jarName, -1, uniqueSrcFiles, srcJars, flags, extraJarDeps)
1479 j.srcJarArgs, j.srcJarDeps = resourcePathsToJarArgs(srcFiles), srcFiles
1482 if Bool(j.properties.Include_srcs) {
1484 TransformResourcesToJar(ctx, includeSrcJar, j.srcJarArgs, j.srcJarDeps)
1487 dirArgs, dirDeps := ResourceDirsToJarArgs(ctx, j.properties.Java_resource_dirs,
1488 j.properties.Exclude_java_resource_dirs, j.properties.Exclude_java_resources)
1489 …fileArgs, fileDeps := ResourceFilesToJarArgs(ctx, j.properties.Java_resources, j.properties.Exclud…
1490 extraArgs, extraDeps := resourcePathsToJarArgs(j.extraResources), j.extraResources
1507 j.resourceJar = resourceJar
1514 if j.resourceJar != nil {
1515 resourceJars = append(resourceJars, j.resourceJar)
1517 if Bool(j.properties.Include_srcs) {
1526 j.resourceJar = combinedJar
1528 j.resourceJar = resourceJars[0]
1535 manifest := j.overrideManifest
1536 if !manifest.Valid() && j.properties.Manifest != nil {
1537 manifest = android.OptionalPathForPath(android.PathForModuleSrc(ctx, *j.properties.Manifest))
1540 services := android.PathsForModuleSrc(ctx, j.properties.Services)
1593 if j.expandJarjarRules != nil {
1596 TransformJarJar(ctx, jarjarFile, outputFile, j.expandJarjarRules)
1600 if j.resourceJar != nil {
1602 TransformJarJar(ctx, resourceJarJarFile, j.resourceJar, j.expandJarjarRules)
1603 j.resourceJar = resourceJarJarFile
1612 if len(j.properties.Permitted_packages) > 0 {
1615 CheckJarPackages(ctx, pkgckFile, outputFile, j.properties.Permitted_packages)
1616 j.additionalCheckedModules = append(j.additionalCheckedModules, pkgckFile)
1623 j.implementationJarFile = outputFile
1624 if j.headerJarFile == nil {
1625 j.headerJarFile = j.implementationJarFile
1628 if j.shouldInstrumentInApex(ctx) {
1629 j.properties.Instrument = true
1632 if j.shouldInstrument(ctx) {
1633 outputFile = j.instrument(ctx, flags, outputFile, jarName)
1638 if j.resourceJar != nil {
1639 jars := android.Paths{j.resourceJar, implementationAndResourcesJar}
1646 j.implementationAndResourcesJar = implementationAndResourcesJar
1649 if android.DirectlyInAnyApex(ctx, ctx.ModuleName()) && !j.IsForPlatform() {
1650 if j.deviceProperties.Compile_dex == nil {
1651 j.deviceProperties.Compile_dex = proptools.BoolPtr(true)
1653 if j.deviceProperties.Hostdex == nil {
1654 j.deviceProperties.Hostdex = proptools.BoolPtr(true)
1658 if ctx.Device() && j.hasCode(ctx) &&
1659 (Bool(j.properties.Installable) || Bool(j.deviceProperties.Compile_dex)) {
1662 dexOutputFile = j.compileDex(ctx, flags, outputFile, jarName)
1667 configurationName := j.ConfigurationName()
1671 …dexOutputFile = j.hiddenAPI.hiddenAPI(ctx, configurationName, primary, dexOutputFile, j.implementa…
1672 proptools.Bool(j.deviceProperties.Uncompress_dex))
1675 if j.resourceJar != nil {
1676 jars := android.Paths{dexOutputFile, j.resourceJar}
1680 if *j.deviceProperties.Uncompress_dex {
1689 j.dexJarFile = dexOutputFile
1692 dexOutputFile = j.dexpreopt(ctx, dexOutputFile)
1694 j.maybeStrippedDexJarFile = dexOutputFile
1714 j.linter.name = ctx.ModuleName()
1715 j.linter.srcs = srcFiles
1716 j.linter.srcJars = srcJars
1717j.linter.classpath = append(append(android.Paths(nil), flags.bootClasspath...), flags.classpath...)
1718 j.linter.classes = j.implementationJarFile
1719 j.linter.minSdkVersion = lintSDKVersionString(j.minSdkVersion())
1720 j.linter.targetSdkVersion = lintSDKVersionString(j.targetSdkVersion())
1721 j.linter.compileSdkVersion = lintSDKVersionString(j.sdkVersion())
1722 j.linter.javaLanguageLevel = flags.javaVersion.String()
1723 j.linter.kotlinLanguageLevel = "1.3"
1724 if j.ApexName() != "" && ctx.Config().UnbundledBuildApps() {
1725 j.linter.buildModuleReportZip = true
1727 j.linter.lint(ctx)
1733 j.outputFile = outputFile.WithoutRel()
1736 func (j *Module) compileJavaClasses(ctx android.ModuleContext, jarName string, idx int,
1751 j.kytheFiles = append(j.kytheFiles, extractionFile)
1782 func (j *Module) compileJavaHeader(ctx android.ModuleContext, srcFiles, srcJars android.Paths,
1811 if j.expandJarjarRules != nil {
1814 TransformJarJar(ctx, jarjarFile, headerJar, j.expandJarjarRules)
1824 func (j *Module) instrument(ctx android.ModuleContext, flags javaBuilderFlags,
1827 specs := j.jacocoModuleToZipCommand(ctx)
1834 j.jacocoReportClassesFile = jacocoReportClassesFile
1841 func (j *Module) HeaderJars() android.Paths {
1842 if j.headerJarFile == nil {
1845 return android.Paths{j.headerJarFile}
1848 func (j *Module) ImplementationJars() android.Paths {
1849 if j.implementationJarFile == nil {
1852 return android.Paths{j.implementationJarFile}
1855 func (j *Module) DexJarBuildPath() android.Path {
1856 return j.dexJarFile
1859 func (j *Module) DexJarInstallPath() android.Path {
1860 return j.installFile
1863 func (j *Module) ResourceJars() android.Paths {
1864 if j.resourceJar == nil {
1867 return android.Paths{j.resourceJar}
1870 func (j *Module) ImplementationAndResourcesJars() android.Paths {
1871 if j.implementationAndResourcesJar == nil {
1874 return android.Paths{j.implementationAndResourcesJar}
1877 func (j *Module) AidlIncludeDirs() android.Paths {
1879 return j.exportAidlIncludeDirs
1882 func (j *Module) ExportedSdkLibs() []string {
1884 return j.exportedSdkLibs
1887 func (j *Module) ExportedPlugins() (android.Paths, []string) {
1888 return j.exportedPluginJars, j.exportedPluginClasses
1891 func (j *Module) SrcJarArgs() ([]string, android.Paths) {
1892 return j.srcJarArgs, j.srcJarDeps
1897 func (j *Module) logtags() android.Paths {
1898 return j.logtagsSrcs
1902 func (j *Module) IDEInfo(dpInfo *android.IdeInfo) {
1903 dpInfo.Deps = append(dpInfo.Deps, j.CompilerDeps()...)
1904 dpInfo.Srcs = append(dpInfo.Srcs, j.expandIDEInfoCompiledSrcs...)
1905 dpInfo.SrcJars = append(dpInfo.SrcJars, j.compiledSrcJars.Strings()...)
1906 …dpInfo.Aidl_include_dirs = append(dpInfo.Aidl_include_dirs, j.deviceProperties.Aidl.Include_dirs..…
1907 if j.expandJarjarRules != nil {
1908 dpInfo.Jarjar_rules = append(dpInfo.Jarjar_rules, j.expandJarjarRules.String())
1910 dpInfo.Paths = append(dpInfo.Paths, j.modulePaths...)
1913 func (j *Module) CompilerDeps() []string {
1915 jdeps = append(jdeps, j.properties.Libs...)
1916 jdeps = append(jdeps, j.properties.Static_libs...)
1920 func (j *Module) hasCode(ctx android.ModuleContext) bool {
1921 srcFiles := android.PathsForModuleSrcExcludes(ctx, j.properties.Srcs, j.properties.Exclude_srcs)
1925 func (j *Module) DepIsInSameApex(ctx android.BaseModuleContext, dep android.Module) bool {
1926 return j.depIsInSameApex(ctx, dep)
1929 func (j *Module) ShouldSupportSdkVersion(ctx android.BaseModuleContext, sdkVersion int) error {
1930 sdkSpec := j.minSdkVersion()
1947 func (j *Module) Stem() string {
1948 return proptools.StringDefault(j.deviceProperties.Stem, j.Name())
1951 func (j *Module) ConfigurationName() string {
1952 return proptools.StringDefault(j.deviceProperties.ConfigurationName, j.BaseModuleName())
1955 func (j *Module) JacocoReportClassesFile() android.Path {
1956 return j.jacocoReportClassesFile
1959 func (j *Module) IsInstallable() bool {
1960 return Bool(j.properties.Installable)
1980 func (j *Library) PermittedPackagesForUpdatableBootJars() []string {
1981 return j.properties.Permitted_packages
2007 func (j *Library) GenerateAndroidBuildActions(ctx android.ModuleContext) {
2008 j.checkSdkVersions(ctx)
2009 j.dexpreopter.installPath = android.PathForModuleInstall(ctx, "framework", j.Stem()+".jar")
2010 j.dexpreopter.isSDKLibrary = j.deviceProperties.IsSDKLibrary
2011 if j.deviceProperties.Uncompress_dex == nil {
2013 j.deviceProperties.Uncompress_dex = proptools.BoolPtr(shouldUncompressDex(ctx, &j.dexpreopter))
2015 j.dexpreopter.uncompressedDex = *j.deviceProperties.Uncompress_dex
2016 j.compile(ctx, nil)
2019 j.modulePaths = append(j.modulePaths, ctx.ModuleDir())
2021 exclusivelyForApex := android.InAnyApex(ctx.ModuleName()) && !j.IsForPlatform()
2022 if (Bool(j.properties.Installable) || ctx.Host()) && !exclusivelyForApex {
2024 if j.InstallMixin != nil {
2025 extraInstallDeps = j.InstallMixin(ctx, j.outputFile)
2027 j.installFile = ctx.InstallFile(android.PathForModuleInstall(ctx, "framework"),
2028 j.Stem()+".jar", j.outputFile, extraInstallDeps...)
2031 j.distFiles = j.GenerateTaggedDistFiles(ctx)
2034 func (j *Library) DepsMutator(ctx android.BottomUpMutatorContext) {
2035 j.deps(ctx)
2059 jarToExportGetter func(j *Library) android.Path
2087 j := variant.(*Library)
2089 p.JarToExport = ctx.MemberType().(*librarySdkMemberType).jarToExportGetter(j)
2090 p.AidlIncludeDirs = j.AidlIncludeDirs()
2124 func(j *Library) android.Path {
2125 headerJars := j.HeaderJars()
2127 panic(fmt.Errorf("there must be only one header jar from %q", j.Name()))
2260 func (j *TestHost) DepsMutator(ctx android.BottomUpMutatorContext) {
2261 if len(j.testHostProperties.Data_native_bins) > 0 {
2263 …ctx.AddVariationDependencies(target.Variations(), dataNativeBinsTag, j.testHostProperties.Data_nat…
2267 j.deps(ctx)
2270 func (j *Test) GenerateAndroidBuildActions(ctx android.ModuleContext) {
2271j.testConfig = tradefed.AutoGenJavaTestConfig(ctx, j.testProperties.Test_config, j.testProperties.…
2272 j.testProperties.Test_suites, j.testProperties.Auto_gen_config)
2274 j.data = android.PathsForModuleSrc(ctx, j.testProperties.Data)
2277 j.data = append(j.data, android.OutputFileForModule(ctx, dep, ""))
2280 j.Library.GenerateAndroidBuildActions(ctx)
2283 func (j *TestHelperLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext) {
2284 j.Library.GenerateAndroidBuildActions(ctx)
2287 func (j *JavaTestImport) GenerateAndroidBuildActions(ctx android.ModuleContext) {
2288 j.testConfig = tradefed.AutoGenJavaTestConfig(ctx, j.prebuiltTestProperties.Test_config, nil,
2289 j.prebuiltTestProperties.Test_suites, nil)
2291 j.Import.GenerateAndroidBuildActions(ctx)
2455 func (j *Binary) HostToolPath() android.OptionalPath {
2456 return android.OptionalPathForPath(j.binaryFile)
2459 func (j *Binary) GenerateAndroidBuildActions(ctx android.ModuleContext) {
2462 if j.binaryProperties.Main_class != nil {
2463 if j.properties.Manifest != nil {
2467 GenerateMainClassManifest(ctx, manifestFile, String(j.binaryProperties.Main_class))
2468 j.overrideManifest = android.OptionalPathForPath(manifestFile)
2471 j.Library.GenerateAndroidBuildActions(ctx)
2474 j.isWrapperVariant = true
2476 if j.binaryProperties.Wrapper != nil {
2477 j.wrapperFile = android.PathForModuleSrc(ctx, *j.binaryProperties.Wrapper)
2479 j.wrapperFile = android.PathForSource(ctx, "build/soong/scripts/jar-wrapper.sh")
2486 j.binaryFile = ctx.InstallExecutable(android.PathForModuleInstall(ctx, "bin"),
2487 ctx.ModuleName(), j.wrapperFile, jarFile)
2491 func (j *Binary) DepsMutator(ctx android.BottomUpMutatorContext) {
2493 j.deps(ctx)
2585 func (j *Import) sdkVersion() sdkSpec {
2586 return sdkSpecFrom(String(j.properties.Sdk_version))
2589 func (j *Import) minSdkVersion() sdkSpec {
2590 return j.sdkVersion()
2593 func (j *Import) MinSdkVersion() string {
2594 return j.minSdkVersion().version.String()
2597 func (j *Import) Prebuilt() *android.Prebuilt {
2598 return &j.prebuilt
2601 func (j *Import) PrebuiltSrcs() []string {
2602 return j.properties.Jars
2605 func (j *Import) Name() string {
2606 return j.prebuilt.Name(j.ModuleBase.Name())
2609 func (j *Import) Stem() string {
2610 return proptools.StringDefault(j.properties.Stem, j.ModuleBase.Name())
2617 func (j *Import) DepsMutator(ctx android.BottomUpMutatorContext) {
2618 ctx.AddVariationDependencies(nil, libTag, j.properties.Libs...)
2621 func (j *Import) GenerateAndroidBuildActions(ctx android.ModuleContext) {
2622 jars := android.PathsForModuleSrc(ctx, j.properties.Jars)
2624 jarName := j.Stem() + ".jar"
2627 false, j.properties.Exclude_files, j.properties.Exclude_dirs)
2628 if Bool(j.properties.Jetifier) {
2633 j.combinedClasspathFile = outputFile
2639 j.exportedSdkLibs = append(j.exportedSdkLibs, j.OptionalImplicitSdkLibrary()...)
2650 j.exportedSdkLibs = append(j.exportedSdkLibs, dep.ExportedSdkLibs()...)
2656 j.exportedSdkLibs = append(j.exportedSdkLibs, otherName)
2661 j.exportedSdkLibs = android.FirstUniqueStrings(j.exportedSdkLibs)
2662 if Bool(j.properties.Installable) {
2667 j.exportAidlIncludeDirs = android.PathsForModuleSrc(ctx, j.properties.Aidl.Export_include_dirs)
2672 func (j *Import) HeaderJars() android.Paths {
2673 if j.combinedClasspathFile == nil {
2676 return android.Paths{j.combinedClasspathFile}
2679 func (j *Import) ImplementationJars() android.Paths {
2680 if j.combinedClasspathFile == nil {
2683 return android.Paths{j.combinedClasspathFile}
2686 func (j *Import) ResourceJars() android.Paths {
2690 func (j *Import) ImplementationAndResourcesJars() android.Paths {
2691 if j.combinedClasspathFile == nil {
2694 return android.Paths{j.combinedClasspathFile}
2697 func (j *Import) DexJarBuildPath() android.Path {
2701 func (j *Import) DexJarInstallPath() android.Path {
2705 func (j *Import) AidlIncludeDirs() android.Paths {
2706 return j.exportAidlIncludeDirs
2709 func (j *Import) ExportedSdkLibs() []string {
2710 return j.exportedSdkLibs
2713 func (j *Import) ExportedPlugins() (android.Paths, []string) {
2717 func (j *Import) SrcJarArgs() ([]string, android.Paths) {
2721 func (j *Import) DepIsInSameApex(ctx android.BaseModuleContext, dep android.Module) bool {
2722 return j.depIsInSameApex(ctx, dep)
2725 func (j *Import) ShouldSupportSdkVersion(ctx android.BaseModuleContext, sdkVersion int) error {
2739 func (j *Import) IDEInfo(dpInfo *android.IdeInfo) {
2740 dpInfo.Jars = append(dpInfo.Jars, j.PrebuiltSrcs()...)
2743 func (j *Import) IDECustomizedModuleName() string {
2747 name := j.Name()
2816 func (j *DexImport) Prebuilt() *android.Prebuilt {
2817 return &j.prebuilt
2820 func (j *DexImport) PrebuiltSrcs() []string {
2821 return j.properties.Jars
2824 func (j *DexImport) Name() string {
2825 return j.prebuilt.Name(j.ModuleBase.Name())
2828 func (j *DexImport) Stem() string {
2829 return proptools.StringDefault(j.properties.Stem, j.ModuleBase.Name())
2840 func (j *DexImport) IsInstallable() bool {
2844 func (j *DexImport) GenerateAndroidBuildActions(ctx android.ModuleContext) {
2845 if len(j.properties.Jars) != 1 {
2849 j.dexpreopter.installPath = android.PathForModuleInstall(ctx, "framework", j.Stem()+".jar")
2850 j.dexpreopter.uncompressedDex = shouldUncompressDex(ctx, &j.dexpreopter)
2852 inputJar := ctx.ExpandSource(j.properties.Jars[0], "jars")
2855 if j.dexpreopter.uncompressedDex {
2887 j.dexJarFile = dexOutputFile
2889 dexOutputFile = j.dexpreopt(ctx, dexOutputFile)
2891 j.maybeStrippedDexJarFile = dexOutputFile
2893 if j.IsForPlatform() {
2895 j.Stem()+".jar", dexOutputFile)
2899 func (j *DexImport) DexJarBuildPath() android.Path {
2900 return j.dexJarFile
2903 func (j *DexImport) ShouldSupportSdkVersion(ctx android.BaseModuleContext, sdkVersion int) error {