Lines Matching refs:j

87 		func(_ android.SdkMemberContext, j *Library) android.Path {
88 headerJars := j.HeaderJars()
90 panic(fmt.Errorf("there must be only one header jar from %q", j.Name()))
100 exportImplementationClassesJar = func(_ android.SdkMemberContext, j *Library) android.Path {
101 implementationJars := j.ImplementationAndResourcesJars()
103 panic(fmt.Errorf("there must be only one implementation jar from %q", j.Name()))
225 func (j *Module) XrefJavaFiles() android.Paths {
226 return j.kytheFiles
460 func (j *Library) PermittedPackagesForUpdatableBootJars() []string {
461 return j.properties.Permitted_packages
487 func (j *Library) GenerateAndroidBuildActions(ctx android.ModuleContext) {
488 j.sdkVersion = j.SdkVersion(ctx)
489 j.minSdkVersion = j.MinSdkVersion(ctx)
493 j.hideApexVariantFromMake = true
496 j.checkSdkVersions(ctx)
497 j.dexpreopter.installPath = android.PathForModuleInstall(ctx, "framework", j.Stem()+".jar")
498 j.dexpreopter.isSDKLibrary = j.deviceProperties.IsSDKLibrary
499 if j.dexProperties.Uncompress_dex == nil {
501 j.dexProperties.Uncompress_dex = proptools.BoolPtr(shouldUncompressDex(ctx, &j.dexpreopter))
503 j.dexpreopter.uncompressedDex = *j.dexProperties.Uncompress_dex
504 j.classLoaderContexts = make(dexpreopt.ClassLoaderContextMap)
505 j.compile(ctx, nil)
508 j.modulePaths = append(j.modulePaths, ctx.ModuleDir())
511 if (Bool(j.properties.Installable) || ctx.Host()) && !exclusivelyForApex {
513 if j.InstallMixin != nil {
514 extraInstallDeps = j.InstallMixin(ctx, j.outputFile)
516 j.installFile = ctx.InstallFile(android.PathForModuleInstall(ctx, "framework"),
517 j.Stem()+".jar", j.outputFile, extraInstallDeps...)
521 func (j *Library) DepsMutator(ctx android.BottomUpMutatorContext) {
522 j.deps(ctx)
546 jarToExportGetter func(ctx android.SdkMemberContext, j *Library) android.Path
591 j := variant.(*Library)
593 p.JarToExport = ctx.MemberType().(*librarySdkMemberType).jarToExportGetter(ctx, j)
595 p.AidlIncludeDirs = j.AidlIncludeDirs()
597 p.PermittedPackages = j.PermittedPackagesForUpdatableBootJars()
784 func (j *TestHost) DepsMutator(ctx android.BottomUpMutatorContext) {
785 if len(j.testHostProperties.Data_native_bins) > 0 {
787 …ctx.AddVariationDependencies(target.Variations(), dataNativeBinsTag, j.testHostProperties.Data_nat…
791 if len(j.testProperties.Jni_libs) > 0 {
794 ctx.AddFarVariationDependencies(sharedLibVariations, jniLibTag, j.testProperties.Jni_libs...)
798 j.deps(ctx)
801 func (j *TestHost) AddExtraResource(p android.Path) {
802 j.extraResources = append(j.extraResources, p)
805 func (j *Test) GenerateAndroidBuildActions(ctx android.ModuleContext) {
806 if j.testProperties.Test_options.Unit_test == nil && ctx.Host() {
808 …defaultUnitTest := !inList("tradefed", j.properties.Libs) && !inList("cts", j.testProperties.Test_…
809 j.testProperties.Test_options.Unit_test = proptools.BoolPtr(defaultUnitTest)
811j.testConfig = tradefed.AutoGenJavaTestConfig(ctx, j.testProperties.Test_config, j.testProperties.…
812j.testProperties.Test_suites, j.testProperties.Auto_gen_config, j.testProperties.Test_options.Unit…
814 j.data = android.PathsForModuleSrc(ctx, j.testProperties.Data)
816j.extraTestConfigs = android.PathsForModuleSrc(ctx, j.testProperties.Test_options.Extra_test_confi…
819 j.data = append(j.data, android.OutputFileForModule(ctx, dep, ""))
839 j.data = append(j.data, relocatedLib)
845 j.Library.GenerateAndroidBuildActions(ctx)
848 func (j *TestHelperLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext) {
849 j.Library.GenerateAndroidBuildActions(ctx)
852 func (j *JavaTestImport) GenerateAndroidBuildActions(ctx android.ModuleContext) {
853 j.testConfig = tradefed.AutoGenJavaTestConfig(ctx, j.prebuiltTestProperties.Test_config, nil,
854 j.prebuiltTestProperties.Test_suites, nil, nil)
856 j.Import.GenerateAndroidBuildActions(ctx)
1036 func (j *Binary) HostToolPath() android.OptionalPath {
1037 return android.OptionalPathForPath(j.binaryFile)
1040 func (j *Binary) GenerateAndroidBuildActions(ctx android.ModuleContext) {
1043 if j.binaryProperties.Main_class != nil {
1044 if j.properties.Manifest != nil {
1048 GenerateMainClassManifest(ctx, manifestFile, String(j.binaryProperties.Main_class))
1049 j.overrideManifest = android.OptionalPathForPath(manifestFile)
1052 j.Library.GenerateAndroidBuildActions(ctx)
1055 j.isWrapperVariant = true
1057 if j.binaryProperties.Wrapper != nil {
1058 j.wrapperFile = android.PathForModuleSrc(ctx, *j.binaryProperties.Wrapper)
1060 j.wrapperFile = android.PathForSource(ctx, "build/soong/scripts/jar-wrapper.sh")
1066 j.binaryFile = ctx.InstallExecutable(android.PathForModuleInstall(ctx, "bin"),
1067 ctx.ModuleName(), j.wrapperFile)
1071 func (j *Binary) DepsMutator(ctx android.BottomUpMutatorContext) {
1073 j.deps(ctx)
1078 ctx.AddVariationDependencies(nil, jniInstallTag, j.binaryProperties.Jni_libs...)
1197 func (j *Import) PermittedPackagesForUpdatableBootJars() []string {
1198 return j.properties.Permitted_packages
1201 func (j *Import) SdkVersion(ctx android.EarlyModuleContext) android.SdkSpec {
1202 return android.SdkSpecFrom(ctx, String(j.properties.Sdk_version))
1205 func (j *Import) SystemModules() string {
1209 func (j *Import) MinSdkVersion(ctx android.EarlyModuleContext) android.SdkSpec {
1210 if j.properties.Min_sdk_version != nil {
1211 return android.SdkSpecFrom(ctx, *j.properties.Min_sdk_version)
1213 return j.SdkVersion(ctx)
1216 func (j *Import) TargetSdkVersion(ctx android.EarlyModuleContext) android.SdkSpec {
1217 return j.SdkVersion(ctx)
1220 func (j *Import) Prebuilt() *android.Prebuilt {
1221 return &j.prebuilt
1224 func (j *Import) PrebuiltSrcs() []string {
1225 return j.properties.Jars
1228 func (j *Import) Name() string {
1229 return j.prebuilt.Name(j.ModuleBase.Name())
1232 func (j *Import) Stem() string {
1233 return proptools.StringDefault(j.properties.Stem, j.ModuleBase.Name())
1240 func (j *Import) LintDepSets() LintDepSets {
1244 func (j *Import) getStrictUpdatabilityLinting() bool {
1248 func (j *Import) setStrictUpdatabilityLinting(bool) {
1251 func (j *Import) DepsMutator(ctx android.BottomUpMutatorContext) {
1252 ctx.AddVariationDependencies(nil, libTag, j.properties.Libs...)
1254 if ctx.Device() && Bool(j.dexProperties.Compile_dex) {
1255 sdkDeps(ctx, android.SdkContext(j), j.dexer)
1259 func (j *Import) GenerateAndroidBuildActions(ctx android.ModuleContext) {
1260 j.sdkVersion = j.SdkVersion(ctx)
1261 j.minSdkVersion = j.MinSdkVersion(ctx)
1264 j.hideApexVariantFromMake = true
1267 jars := android.PathsForModuleSrc(ctx, j.properties.Jars)
1269 jarName := j.Stem() + ".jar"
1272 false, j.properties.Exclude_files, j.properties.Exclude_dirs)
1273 if Bool(j.properties.Jetifier) {
1278 j.combinedClasspathFile = outputFile
1279 j.classLoaderContexts = make(dexpreopt.ClassLoaderContextMap)
1298 flags.classpath = append(flags.classpath, dep.SdkHeaderJars(ctx, j.SdkVersion(ctx))...)
1302 addCLCFromDep(ctx, module, j.classLoaderContexts)
1314 if Bool(j.properties.Installable) {
1319 j.exportAidlIncludeDirs = android.PathsForModuleSrc(ctx, j.properties.Aidl.Export_include_dirs)
1330 j.Name(), ai.ApexVariationName)
1336 …if dexOutputPath := di.PrebuiltExportPath(apexRootRelativePathToJavaLib(j.BaseModuleName())); dexO…
1337 j.dexJarFile = dexOutputPath
1340 j.initHiddenAPI(ctx, dexOutputPath, outputFile, nil)
1346 } else if Bool(j.dexProperties.Compile_dex) {
1347 sdkDep := decodeSdkDep(ctx, android.SdkContext(j))
1358 j.dexpreopter.installPath = android.PathForModuleInstall(ctx, "framework", jarName)
1359 if j.dexProperties.Uncompress_dex == nil {
1361 j.dexProperties.Uncompress_dex = proptools.BoolPtr(shouldUncompressDex(ctx, &j.dexpreopter))
1363 j.dexpreopter.uncompressedDex = *j.dexProperties.Uncompress_dex
1366 dexOutputFile = j.dexer.compileDex(ctx, flags, j.MinSdkVersion(ctx), outputFile, jarName)
1372 j.initHiddenAPI(ctx, dexOutputFile, outputFile, j.dexProperties.Uncompress_dex)
1375 dexOutputFile = j.hiddenAPIEncodeDex(ctx, dexOutputFile)
1377 j.dexJarFile = dexOutputFile
1382 HeaderJars: android.PathsIfNonNil(j.combinedClasspathFile),
1383 ImplementationAndResourcesJars: android.PathsIfNonNil(j.combinedClasspathFile),
1384 ImplementationJars: android.PathsIfNonNil(j.combinedClasspathFile),
1385 AidlIncludeDirs: j.exportAidlIncludeDirs,
1389 func (j *Import) OutputFiles(tag string) (android.Paths, error) {
1392 return android.Paths{j.combinedClasspathFile}, nil
1400 func (j *Import) HeaderJars() android.Paths {
1401 if j.combinedClasspathFile == nil {
1404 return android.Paths{j.combinedClasspathFile}
1407 func (j *Import) ImplementationAndResourcesJars() android.Paths {
1408 if j.combinedClasspathFile == nil {
1411 return android.Paths{j.combinedClasspathFile}
1414 func (j *Import) DexJarBuildPath() android.Path {
1415 return j.dexJarFile
1418 func (j *Import) DexJarInstallPath() android.Path {
1422 func (j *Import) ClassLoaderContexts() dexpreopt.ClassLoaderContextMap {
1423 return j.classLoaderContexts
1429 func (j *Import) DepIsInSameApex(ctx android.BaseModuleContext, dep android.Module) bool {
1430 return j.depIsInSameApex(ctx, dep)
1434 func (j *Import) ShouldSupportSdkVersion(ctx android.BaseModuleContext,
1436 sdkSpec := j.MinSdkVersion(ctx)
1471 func (j *Import) RequiredFilesFromPrebuiltApex(_ android.BaseModuleContext) []string {
1472 name := j.BaseModuleName()
1485 func (j *Import) IDEInfo(dpInfo *android.IdeInfo) {
1486 dpInfo.Jars = append(dpInfo.Jars, j.PrebuiltSrcs()...)
1489 func (j *Import) IDECustomizedModuleName() string {
1493 name := j.Name()
1502 func (j *Import) IsInstallable() bool {
1503 return Bool(j.properties.Installable)
1574 func (j *DexImport) Prebuilt() *android.Prebuilt {
1575 return &j.prebuilt
1578 func (j *DexImport) PrebuiltSrcs() []string {
1579 return j.properties.Jars
1582 func (j *DexImport) Name() string {
1583 return j.prebuilt.Name(j.ModuleBase.Name())
1586 func (j *DexImport) Stem() string {
1587 return proptools.StringDefault(j.properties.Stem, j.ModuleBase.Name())
1598 func (j *DexImport) IsInstallable() bool {
1602 func (j *DexImport) getStrictUpdatabilityLinting() bool {
1606 func (j *DexImport) setStrictUpdatabilityLinting(bool) {
1609 func (j *DexImport) GenerateAndroidBuildActions(ctx android.ModuleContext) {
1610 if len(j.properties.Jars) != 1 {
1616 j.hideApexVariantFromMake = true
1619 j.dexpreopter.installPath = android.PathForModuleInstall(ctx, "framework", j.Stem()+".jar")
1620 j.dexpreopter.uncompressedDex = shouldUncompressDex(ctx, &j.dexpreopter)
1622 inputJar := ctx.ExpandSource(j.properties.Jars[0], "jars")
1625 if j.dexpreopter.uncompressedDex {
1657 j.dexJarFile = dexOutputFile
1659 j.dexpreopt(ctx, dexOutputFile)
1663 j.Stem()+".jar", dexOutputFile)
1667 func (j *DexImport) DexJarBuildPath() android.Path {
1668 return j.dexJarFile
1674 func (j *DexImport) ShouldSupportSdkVersion(ctx android.BaseModuleContext,