soong: Squash of omnirom-sdk bringup commits

Squash of:

Author: Rashed Abdel-Tawab <rashed@linux.com>
Date:   Thu Aug 9 14:08:53 2018 -0700
    soong: Special case Lineage SDK
     * org.lineageos.platform-res.apk needs to be installed to /system/framework
     * org.lineageos.platform-res needs to be a dependency for
       org.lineageos.platform and org.lineageos.platform.internal
     * Add other special exceptions for org.lineageos.platform-res
    Change-Id: Ic617c07c086916005ea4b88f26d31c61691a45f8

Author: Sam Mortimer <sam@mortimer.me.uk>
Date:   Thu Aug 30 15:33:16 2018 -0700
    soong: make org.lineage.platform-res depend on framework-res
    *) Allows us to build org.lineage.platform-res with no_framework_libs
       true (as is done for framework-res).
    *) Whilst we're here, undo a dependency loop prevention in aar.go
       that we added during sdk bringup to allow our platform res to build
       with no_framework_libs false.
    Change-Id: Ib452a2e45112baf5d61b70b4be1ce0c01dfd84e5

Author: Luca Stefani <luca.stefani.ge1@gmail.com>
Date:   Mon Feb 4 18:56:52 2019 +0100
    Always link org.lineageos.platform-res for org.lineageos.platform.sdk
    Test: m clean && m org.lineageos.platform.sdk
    Change-Id: I58956855bd4d1157e2582103c4861e7b384b4f73

Author: Sam Mortimer <sam@mortimer.me.uk>
Date:   Fri Aug 31 10:52:29 2018 -0700
    soong: Allow framework to access lineage-sdk resources
    *) Make framework depend on lineage-sdk resource package
    *) Allows framework module to access lineage-sdk resources
       via usual org.lineageos.platform.internal.R paths.
    Change-Id: Ifd19d43d9308ac370ad40a499de16bf8ce204beb

Author: Luca Stefani <luca.stefani.ge1@gmail.com>
Date:   Tue Oct 12 17:59:21 2021 +0200
    Don't manually add lineage res to apps
    Only exception left is the hard dep of framework-res
    into org.lineage.platform-res
    Change-Id: I02585a6581da75a442b2967c89a51929d4778ea4

Author: Luca Stefani <luca.stefani.ge1@gmail.com>
Date:   Tue Oct 12 17:58:56 2021 +0200
    Make lineage res module support variation deps
    Change-Id: I823ccc87c3716bb3eb73948e228d90d45c1c29c9

Change-Id: Icc18de5dfaa83fc0a1eda6f3704f3a92e1de0764

soong: Convert to omnirom-sdk

Change-Id: I7edf22d6eda75e2603dff12767a4c5da7d10486d
diff --git a/java/java.go b/java/java.go
index 08fb678..8899ba4 100644
--- a/java/java.go
+++ b/java/java.go
@@ -421,6 +421,7 @@
 	bootClasspathTag        = dependencyTag{name: "bootclasspath", runtimeLinked: true}
 	systemModulesTag        = dependencyTag{name: "system modules", runtimeLinked: true}
 	frameworkResTag         = dependencyTag{name: "framework-res"}
+	omniromResTag           = dependencyTag{name: "omnirom-res"}
 	kotlinStdlibTag         = dependencyTag{name: "kotlin-stdlib", runtimeLinked: true}
 	kotlinAnnotationsTag    = dependencyTag{name: "kotlin-annotations", runtimeLinked: true}
 	kotlinPluginTag         = dependencyTag{name: "kotlin-plugin", toolchain: true}
@@ -469,6 +470,7 @@
 	java9Classpath []string
 
 	frameworkResModule string
+	omniromResModule   string
 
 	jars android.Paths
 	aidl android.OptionalPath
@@ -512,6 +514,10 @@
 	if sdkDep.systemModules != "" {
 		ctx.AddVariationDependencies(nil, systemModulesTag, sdkDep.systemModules)
 	}
+
+	if ctx.ModuleName() == "omnirom-res" {
+		ctx.AddVariationDependencies(nil, frameworkResTag, "framework-res")
+	}
 }
 
 type deps struct {