Lines Matching refs:g
101 func (g *aidlGenRule) GenerateAndroidBuildActions(ctx android.ModuleContext) {
102 srcs, imports := getPaths(ctx, g.properties.Srcs, g.properties.AidlRoot)
109 g.implicitInputs = append(g.implicitInputs, genDirTimestamp)
111 importPaths, implicits := getImportsFromDeps(ctx, g.properties.IsToT)
114 g.importFlags = strings.Join(wrap("-I", imports, ""), " ")
116 g.genOutDir = android.PathForModuleGen(ctx)
117 g.genHeaderDir = android.PathForModuleGen(ctx, "include")
119 outFile, headers := g.generateBuildActionsForSingleAidl(ctx, src)
120 g.genOutputs = append(g.genOutputs, outFile)
121 g.genHeaderDeps = append(g.genHeaderDeps, headers...)
131 "outDir": g.genOutDir.String(),
139 Inputs: g.genOutputs.Paths(),
143 func (g *aidlGenRule) generateBuildActionsForSingleAidl(ctx android.ModuleContext, src android.Path…
144 baseDir := getBaseDir(ctx, src, android.PathForModuleSrc(ctx, g.properties.AidlRoot))
147 if g.properties.Lang == langJava {
149 } else if g.properties.Lang == langRust {
156 implicits := g.implicitInputs
158 optionalFlags := append([]string{}, g.properties.Flags...)
159 if g.properties.Version != "" {
160 optionalFlags = append(optionalFlags, "--version "+g.properties.Version)
169 g.hashFile = hashFile.Path()
174 if g.properties.GenTrace {
177 if g.properties.Stability != nil {
178 optionalFlags = append(optionalFlags, "--stability", *g.properties.Stability)
182 if g.properties.Lang == langJava {
189 "imports": g.importFlags,
190 "outDir": g.genOutDir.String(),
194 } else if g.properties.Lang == langRust {
201 "imports": g.importFlags,
202 "outDir": g.genOutDir.String(),
219 if g.properties.Lang == langNdk || g.properties.Lang == langNdkPlatform {
223 headers = append(headers, g.genHeaderDir.Join(ctx, prefix, packagePath,
225 headers = append(headers, g.genHeaderDir.Join(ctx, prefix, packagePath,
227 headers = append(headers, g.genHeaderDir.Join(ctx, prefix, packagePath,
230 if g.properties.GenLog {
234 aidlLang := g.properties.Lang
246 "imports": g.importFlags,
248 "headerDir": g.genHeaderDir.String(),
249 "outDir": g.genOutDir.String(),
258 func (g *aidlGenRule) GeneratedSourceFiles() android.Paths {
259 return g.genOutputs.Paths()
262 func (g *aidlGenRule) Srcs() android.Paths {
263 return g.genOutputs.Paths()
266 func (g *aidlGenRule) GeneratedDeps() android.Paths {
267 return g.genHeaderDeps
270 func (g *aidlGenRule) GeneratedHeaderDirs() android.Paths {
271 return android.Paths{g.genHeaderDir}
274 func (g *aidlGenRule) DepsMutator(ctx android.BottomUpMutatorContext) {
276 ctx.AddDependency(ctx.Module(), interfaceDep, g.properties.BaseName+aidlInterfaceSuffix)
278 if !proptools.Bool(g.properties.Unstable) {
280 ctx.AddDependency(ctx.Module(), apiDep, g.properties.BaseName+aidlApiSuffix)
284 …ctx.AddDependency(ctx.Module(), importInterfaceDep, wrap("", g.properties.ImportsWithoutVersion, a…
290 g := &aidlGenRule{}
291 g.AddProperties(&g.properties)
292 android.InitAndroidModule(g)
293 return g