Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a1c9d20d authored by Ulyana Trafimovich's avatar Ulyana Trafimovich Committed by Automerger Merge Worker
Browse files

Merge "Defer dexpreopt failure with missing implementation jar" am: 9d373d8c am: 4f96d844

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1849413

Change-Id: I013d245ae54ceb78138bd41e8a121681d12be186
parents ae4d3259 4f96d844
Loading
Loading
Loading
Loading
+8 −1
Original line number Original line Diff line number Diff line
@@ -598,11 +598,18 @@ func toJsonClassLoaderContext(clcMap ClassLoaderContextMap) jsonClassLoaderConte
func toJsonClassLoaderContextRec(clcs []*ClassLoaderContext) []*jsonClassLoaderContext {
func toJsonClassLoaderContextRec(clcs []*ClassLoaderContext) []*jsonClassLoaderContext {
	jClcs := make([]*jsonClassLoaderContext, len(clcs))
	jClcs := make([]*jsonClassLoaderContext, len(clcs))
	for i, clc := range clcs {
	for i, clc := range clcs {
		var host string
		if clc.Host == nil {
			// Defer build failure to when this CLC is actually used.
			host = fmt.Sprintf("implementation-jar-for-%s-is-not-available.jar", clc.Name)
		} else {
			host = clc.Host.String()
		}
		jClcs[i] = &jsonClassLoaderContext{
		jClcs[i] = &jsonClassLoaderContext{
			Name:        clc.Name,
			Name:        clc.Name,
			Optional:    clc.Optional,
			Optional:    clc.Optional,
			Implicit:    clc.Implicit,
			Implicit:    clc.Implicit,
			Host:        clc.Host.String(),
			Host:        host,
			Device:      clc.Device,
			Device:      clc.Device,
			Subcontexts: toJsonClassLoaderContextRec(clc.Subcontexts),
			Subcontexts: toJsonClassLoaderContextRec(clc.Subcontexts),
		}
		}