mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
[fleet] Move fleet.modules.api to Community
(cherry picked from commit 4a346439595cd8494ddccfc264a7e20ad12f7109) FLEET-MR-6894 GitOrigin-RevId: 1228b295545793a91df122b123320a824725b653
This commit is contained in:
committed by
intellij-monorepo-bot
parent
5cfaa39a22
commit
4d8f4f3312
1
.idea/modules.xml
generated
1
.idea/modules.xml
generated
@@ -10,6 +10,7 @@
|
||||
<module fileurl="file://$PROJECT_DIR$/fleet/kernel/fleet.kernel.iml" filepath="$PROJECT_DIR$/fleet/kernel/fleet.kernel.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/fleet/ktor/network/tls/fleet.ktor.network.tls.iml" filepath="$PROJECT_DIR$/fleet/ktor/network/tls/fleet.ktor.network.tls.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/fleet/lsp.protocol/fleet.lsp.protocol.iml" filepath="$PROJECT_DIR$/fleet/lsp.protocol/fleet.lsp.protocol.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/fleet/modules/api/fleet.modules.api.iml" filepath="$PROJECT_DIR$/community/fleet/modules/api/fleet.modules.api.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/fleet/multiplatform.shims/fleet.multiplatform.shims.iml" filepath="$PROJECT_DIR$/fleet/multiplatform.shims/fleet.multiplatform.shims.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/fleet/preferences/fleet.preferences.iml" filepath="$PROJECT_DIR$/community/fleet/preferences/fleet.preferences.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/fleet/reporting/api/fleet.reporting.api.iml" filepath="$PROJECT_DIR$/fleet/reporting/api/fleet.reporting.api.iml" />
|
||||
|
||||
@@ -227,6 +227,7 @@ fleet/junit4
|
||||
fleet/kernel
|
||||
fleet/ktor/network/tls
|
||||
fleet/lsp.protocol
|
||||
fleet/modules/api
|
||||
fleet/multiplatform.shims
|
||||
fleet/preferences
|
||||
fleet/reporting/api
|
||||
|
||||
21
fleet/modules/api/BUILD.bazel
Normal file
21
fleet/modules/api/BUILD.bazel
Normal file
@@ -0,0 +1,21 @@
|
||||
### auto-generated section `build fleet.modules.api` start
|
||||
load("//build:compiler-options.bzl", "create_kotlinc_options")
|
||||
load("@rules_jvm//:jvm.bzl", "jvm_library")
|
||||
|
||||
create_kotlinc_options(
|
||||
name = "custom_api",
|
||||
x_consistent_data_class_copy_visibility = True,
|
||||
x_context_parameters = True,
|
||||
x_jvm_default = "all-compatibility",
|
||||
x_lambdas = "class"
|
||||
)
|
||||
|
||||
jvm_library(
|
||||
name = "api",
|
||||
module_name = "fleet.modules.api",
|
||||
visibility = ["//visibility:public"],
|
||||
srcs = glob(["srcCommonMain/**/*.kt", "srcCommonMain/**/*.java", "srcCommonMain/**/*.form"], allow_empty = True, exclude = ["**/module-info.java"]),
|
||||
kotlinc_opts = ":custom_api",
|
||||
deps = ["@lib//:kotlin-stdlib"]
|
||||
)
|
||||
### auto-generated section `build fleet.modules.api` end
|
||||
29
fleet/modules/api/fleet.modules.api.iml
Normal file
29
fleet/modules/api/fleet.modules.api.iml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="kotlin-language" name="Kotlin">
|
||||
<configuration version="5" platform="JVM 21" allPlatforms="JVM [21]" useProjectSettings="false">
|
||||
<compilerSettings>
|
||||
<option name="additionalArguments" value="-Xlambdas=class -Xconsistent-data-class-copy-visibility -Xcontext-parameters -XXLanguage:+AllowEagerSupertypeAccessibilityChecks" />
|
||||
</compilerSettings>
|
||||
<compilerArguments>
|
||||
<stringArguments>
|
||||
<stringArg name="jvmTarget" arg="21" />
|
||||
<stringArg name="apiVersion" arg="2.2" />
|
||||
<stringArg name="languageVersion" arg="2.2" />
|
||||
</stringArguments>
|
||||
</compilerArguments>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/srcCommonMain" isTestSource="false" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/gradlebuild/build" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="kotlin-stdlib" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
58
fleet/modules/api/gradlebuild/build.gradle.kts
Normal file
58
fleet/modules/api/gradlebuild/build.gradle.kts
Normal file
@@ -0,0 +1,58 @@
|
||||
// IMPORT__MARKER_START
|
||||
import fleet.buildtool.conventions.configureAtMostOneJvmTargetOrThrow
|
||||
import fleet.buildtool.conventions.withJavaSourceSet
|
||||
// IMPORT__MARKER_END
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
id("fleet.project-module-conventions")
|
||||
id("fleet.toolchain-conventions")
|
||||
id("fleet.module-publishing-conventions")
|
||||
id("fleet.sdk-repositories-publishing-conventions")
|
||||
id("fleet.open-source-module-conventions")
|
||||
alias(libs.plugins.dokka)
|
||||
// GRADLE_PLUGINS__MARKER_START
|
||||
id("fleet-module")
|
||||
// GRADLE_PLUGINS__MARKER_END
|
||||
}
|
||||
|
||||
fleetModule {
|
||||
module {
|
||||
name = "fleet.modules.api"
|
||||
importedFromJps {}
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalWasmDsl::class)
|
||||
kotlin {
|
||||
// KOTLIN__MARKER_START
|
||||
compilerOptions.freeCompilerArgs = listOf(
|
||||
"-Xlambdas=class",
|
||||
"-Xconsistent-data-class-copy-visibility",
|
||||
"-Xcontext-parameters",
|
||||
"-XXLanguage:+AllowEagerSupertypeAccessibilityChecks",
|
||||
)
|
||||
jvm {}
|
||||
wasmJs {
|
||||
browser {}
|
||||
}
|
||||
sourceSets.commonMain.configure { kotlin.srcDir(layout.projectDirectory.dir("../srcCommonMain")) }
|
||||
sourceSets.commonMain.configure { resources.srcDir(layout.projectDirectory.dir("../resourcesCommonMain")) }
|
||||
sourceSets.commonTest.configure { kotlin.srcDir(layout.projectDirectory.dir("../srcCommonTest")) }
|
||||
sourceSets.commonTest.configure { resources.srcDir(layout.projectDirectory.dir("../resourcesCommonTest")) }
|
||||
sourceSets.jvmMain.configure { kotlin.srcDir(layout.projectDirectory.dir("../srcJvmMain")) }
|
||||
configureAtMostOneJvmTargetOrThrow { compilations.named("main") { withJavaSourceSet { javaSourceSet -> javaSourceSet.java.srcDir(layout.projectDirectory.dir("../srcJvmMain")) } } }
|
||||
sourceSets.jvmMain.configure { resources.srcDir(layout.projectDirectory.dir("../resourcesJvmMain")) }
|
||||
sourceSets.jvmTest.configure { kotlin.srcDir(layout.projectDirectory.dir("../srcJvmTest")) }
|
||||
configureAtMostOneJvmTargetOrThrow { compilations.named("test") { withJavaSourceSet { javaSourceSet -> javaSourceSet.java.srcDir(layout.projectDirectory.dir("../srcJvmTest")) } } }
|
||||
sourceSets.jvmTest.configure { resources.srcDir(layout.projectDirectory.dir("../resourcesJvmTest")) }
|
||||
sourceSets.wasmJsMain.configure { kotlin.srcDir(layout.projectDirectory.dir("../srcWasmJsMain")) }
|
||||
sourceSets.wasmJsMain.configure { resources.srcDir(layout.projectDirectory.dir("../resourcesWasmJsMain")) }
|
||||
sourceSets.wasmJsTest.configure { kotlin.srcDir(layout.projectDirectory.dir("../srcWasmJsTest")) }
|
||||
sourceSets.wasmJsTest.configure { resources.srcDir(layout.projectDirectory.dir("../resourcesWasmJsTest")) }
|
||||
sourceSets.commonMain.dependencies {
|
||||
implementation(jps.org.jetbrains.kotlin.kotlin.stdlib1993400674.get().let { "${it.group}:${it.name}:${it.version}" }) {
|
||||
exclude(group = "org.jetbrains", module = "annotations")
|
||||
}
|
||||
}
|
||||
// KOTLIN__MARKER_END
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package fleet.modules.api
|
||||
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
interface FleetModule {
|
||||
val name: String
|
||||
val layer: FleetModuleLayer
|
||||
|
||||
@Deprecated("Get rid of it as soon as we drop entities auto-registration")
|
||||
fun getEntityTypeProvider(providerName: String): Any?
|
||||
|
||||
fun getResource(path: String): ByteArray?
|
||||
|
||||
fun <T : Any> findServices(service: KClass<T>, requestor: KClass<*>): Iterable<T>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
package fleet.modules.api
|
||||
|
||||
sealed interface FleetModuleInfo {
|
||||
data class WithDescriptor(val serializedModuleDescriptor: String, val path: String) : FleetModuleInfo
|
||||
data class Path(val path: String) : FleetModuleInfo
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package fleet.modules.api
|
||||
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
interface FleetModuleLayer {
|
||||
val modules: Set<FleetModule>
|
||||
|
||||
fun findModule(name: String): FleetModule?
|
||||
|
||||
fun <T: Any> findServices(service: KClass<T>, requestor: KClass<*>): Iterable<T>
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package fleet.modules.api
|
||||
|
||||
fun interface FleetModuleLayerLoader {
|
||||
fun moduleLayer(parentLayers: List<FleetModuleLayer>, modulePath: Set<FleetModuleInfo>): FleetModuleLayer
|
||||
}
|
||||
Reference in New Issue
Block a user