[project] extracting credential store API classes into a separate module

GitOrigin-RevId: 9729c01a9737d01d7a9730401f2307b185991779
This commit is contained in:
Roman Shevchenko
2024-06-24 21:12:25 +02:00
committed by intellij-monorepo-bot
parent 57cdc3e628
commit 2a1d8d17a6
18 changed files with 141 additions and 116 deletions

1
.idea/modules.xml generated
View File

@@ -585,6 +585,7 @@
<module fileurl="file://$PROJECT_DIR$/platform/core-ui/intellij.platform.core.ui.iml" filepath="$PROJECT_DIR$/platform/core-ui/intellij.platform.core.ui.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/coverage-common/intellij.platform.coverage.iml" filepath="$PROJECT_DIR$/plugins/coverage-common/intellij.platform.coverage.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/coverage-common/intellij.platform.coverage.agent/intellij.platform.coverage.agent.iml" filepath="$PROJECT_DIR$/plugins/coverage-common/intellij.platform.coverage.agent/intellij.platform.coverage.agent.iml" />
<module fileurl="file://$PROJECT_DIR$/platform/credential-store/intellij.platform.credentialStore.iml" filepath="$PROJECT_DIR$/platform/credential-store/intellij.platform.credentialStore.iml" />
<module fileurl="file://$PROJECT_DIR$/platform/credential-store-impl/intellij.platform.credentialStore.impl.iml" filepath="$PROJECT_DIR$/platform/credential-store-impl/intellij.platform.credentialStore.impl.iml" />
<module fileurl="file://$PROJECT_DIR$/platform/credential-store-ui/intellij.platform.credentialStore.ui.iml" filepath="$PROJECT_DIR$/platform/credential-store-ui/intellij.platform.credentialStore.ui.iml" />
<module fileurl="file://$PROJECT_DIR$/platform/xdebugger-api/intellij.platform.debugger.iml" filepath="$PROJECT_DIR$/platform/xdebugger-api/intellij.platform.debugger.iml" />

View File

@@ -1,6 +1,5 @@
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
@file:Suppress("ReplaceJavaStaticMethodWithKotlinAnalog", "ReplaceGetOrSet")
@file:Suppress("ReplaceJavaStaticMethodWithKotlinAnalog")
package org.jetbrains.intellij.build.impl
import com.intellij.openapi.util.JDOMUtil
@@ -25,9 +24,11 @@ import java.nio.file.Files
import java.nio.file.Path
import java.util.*
@Suppress("RemoveRedundantQualifierName")
private val PLATFORM_API_MODULES = java.util.List.of(
"intellij.platform.analysis",
"intellij.platform.builtInServer",
"intellij.platform.credentialStore",
"intellij.platform.diff",
"intellij.platform.editor",
"intellij.platform.externalSystem",
@@ -48,6 +49,7 @@ private val PLATFORM_API_MODULES = java.util.List.of(
/**
* List of modules which are included in lib/app.jar in all IntelliJ based IDEs.
*/
@Suppress("RemoveRedundantQualifierName")
private val PLATFORM_IMPLEMENTATION_MODULES = java.util.List.of(
"intellij.platform.analysis.impl",
"intellij.platform.diff.impl",
@@ -91,6 +93,7 @@ private val PLATFORM_IMPLEMENTATION_MODULES = java.util.List.of(
"intellij.platform.sqlite",
)
@Suppress("RemoveRedundantQualifierName")
internal val PLATFORM_CUSTOM_PACK_MODE: Map<String, LibraryPackMode> = java.util.Map.of(
"jetbrains-annotations", LibraryPackMode.STANDALONE_SEPARATE_WITHOUT_VERSION_NAME,
)
@@ -494,6 +497,7 @@ private suspend fun processAndGetProductPluginContentModules(
}
// todo implement correct processing
@Suppress("RemoveRedundantQualifierName")
private val excludedPaths = java.util.Set.of(
"/META-INF/ultimate.xml",
"/META-INF/RdServer.xml",
@@ -581,7 +585,7 @@ private fun collectAndEmbedProductModules(root: Element, xIncludePathResolver: X
val moduleName = moduleElement.getAttributeValue("name") ?: continue
val relativeOutFile = "modules/$moduleName.jar"
result.add(ModuleItem(moduleName = moduleName, relativeOutputFile = relativeOutFile, reason = ModuleIncludeReasons.PRODUCT_MODULES))
PRODUCT_MODULE_IMPL_COMPOSITION.get(moduleName)?.let {
PRODUCT_MODULE_IMPL_COMPOSITION[moduleName]?.let {
it.mapTo(result) { subModuleName ->
ModuleItem(moduleName = subModuleName, relativeOutputFile = relativeOutFile, reason = ModuleIncludeReasons.PRODUCT_MODULES)
}
@@ -597,6 +601,7 @@ private fun collectAndEmbedProductModules(root: Element, xIncludePathResolver: X
// Previously, it was specified in PLATFORM_IMPLEMENTATION_MODULES/PLATFORM_API_MODULES.
// Once the shape of the extracted module becomes fully discernible,
// we can consider ways to improve `pluginAuto` and eliminate the need for an explicit declaration here.
@Suppress("RemoveRedundantQualifierName")
private val PRODUCT_MODULE_IMPL_COMPOSITION = java.util.Map.of(
"intellij.platform.vcs.log.impl", listOf(
"intellij.platform.vcs.log.graph.impl",
@@ -615,4 +620,4 @@ private val PRODUCT_MODULE_IMPL_COMPOSITION = java.util.Map.of(
internal object ModuleIncludeReasons {
const val PRODUCT_MODULES: String = "productModule"
}
}

View File

@@ -9,18 +9,21 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="kotlin-stdlib" level="project" />
<orderEntry type="module" module-name="intellij.platform.credentialStore" />
<orderEntry type="module" module-name="intellij.platform.ide.core" />
<orderEntry type="library" name="jna" level="project" />
<orderEntry type="module" module-name="intellij.platform.ide.core.impl" />
<orderEntry type="library" scope="TEST" name="assertJ" level="project" />
<orderEntry type="library" scope="TEST" name="JUnit4" level="project" />
<orderEntry type="module" module-name="intellij.platform.testFramework" scope="TEST" />
<orderEntry type="library" name="Guava" level="project" />
<orderEntry type="library" name="bouncy-castle-provider" level="project" />
<orderEntry type="module" module-name="intellij.platform.util.jdom" />
<orderEntry type="module" module-name="intellij.platform.projectModel.impl" />
<orderEntry type="module" module-name="intellij.platform.testExtensions" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.core.ui" />
<orderEntry type="module" module-name="intellij.platform.ide.util.io" />
<orderEntry type="module" module-name="intellij.platform.remote.core" />
<orderEntry type="module" module-name="intellij.platform.editor" />
<orderEntry type="module" module-name="intellij.platform.util.ui" />
<orderEntry type="library" name="kotlin-stdlib" level="project" />
<orderEntry type="library" name="kotlinx-coroutines-core" level="project" />
<orderEntry type="library" name="jna" level="project" />
<orderEntry type="library" name="Guava" level="project" />
<orderEntry type="library" name="bouncy-castle-provider" level="project" />
<orderEntry type="library" name="snakeyaml" level="project" />
<orderEntry type="library" name="fastutil-min" level="project" />
<orderEntry type="module-library">
@@ -50,11 +53,9 @@
</library>
</orderEntry>
<orderEntry type="library" name="caffeine" level="project" />
<orderEntry type="module" module-name="intellij.platform.core.ui" />
<orderEntry type="module" module-name="intellij.platform.ide.util.io" />
<orderEntry type="module" module-name="intellij.platform.remote.core" />
<orderEntry type="module" module-name="intellij.platform.editor" />
<orderEntry type="module" module-name="intellij.platform.util.ui" />
<orderEntry type="library" name="kotlinx-coroutines-core" level="project" />
<orderEntry type="module" module-name="intellij.platform.testFramework" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.testExtensions" scope="TEST" />
<orderEntry type="library" scope="TEST" name="assertJ" level="project" />
<orderEntry type="library" scope="TEST" name="JUnit4" level="project" />
</component>
</module>

View File

@@ -0,0 +1,92 @@
f:com.intellij.credentialStore.CredentialAttributes
- <init>(java.lang.String):V
- <init>(java.lang.String,java.lang.String):V
- <init>(java.lang.String,java.lang.String,java.lang.Class):V
- <init>(java.lang.String,java.lang.String,java.lang.Class,Z):V
- b:<init>(java.lang.String,java.lang.String,java.lang.Class,Z,I,kotlin.jvm.internal.DefaultConstructorMarker):V
- <init>(java.lang.String,java.lang.String,java.lang.Class,Z,Z):V
- b:<init>(java.lang.String,java.lang.String,java.lang.Class,Z,Z,I,kotlin.jvm.internal.DefaultConstructorMarker):V
- f:component1():java.lang.String
- f:component2():java.lang.String
- f:component3():java.lang.Class
- f:component4():Z
- f:component5():Z
- f:copy(java.lang.String,java.lang.String,java.lang.Class,Z,Z):com.intellij.credentialStore.CredentialAttributes
- bs:copy$default(com.intellij.credentialStore.CredentialAttributes,java.lang.String,java.lang.String,java.lang.Class,Z,Z,I,java.lang.Object):com.intellij.credentialStore.CredentialAttributes
- equals(java.lang.Object):Z
- f:getCacheDeniedItems():Z
- f:getRequestor():java.lang.Class
- f:getServiceName():java.lang.String
- f:getUserName():java.lang.String
- hashCode():I
- f:isPasswordMemoryOnly():Z
f:com.intellij.credentialStore.CredentialAttributesKt
- sf:SERVICE_NAME_PREFIX:java.lang.String
- sf:generateServiceName(java.lang.String,java.lang.String):java.lang.String
- sf:getACCESS_TO_KEY_CHAIN_DENIED():com.intellij.credentialStore.Credentials
- sf:getCANNOT_UNLOCK_KEYCHAIN():com.intellij.credentialStore.Credentials
- sf:hasOnlyUserName(com.intellij.credentialStore.Credentials):Z
- sf:isEmpty(com.intellij.credentialStore.Credentials):Z
- sf:isFulfilled(com.intellij.credentialStore.Credentials):Z
f:com.intellij.credentialStore.CredentialRequestResult
- <init>(com.intellij.credentialStore.Credentials,Z):V
- f:component1():com.intellij.credentialStore.Credentials
- f:component2():Z
- f:copy(com.intellij.credentialStore.Credentials,Z):com.intellij.credentialStore.CredentialRequestResult
- bs:copy$default(com.intellij.credentialStore.CredentialRequestResult,com.intellij.credentialStore.Credentials,Z,I,java.lang.Object):com.intellij.credentialStore.CredentialRequestResult
- equals(java.lang.Object):Z
- f:getCredentials():com.intellij.credentialStore.Credentials
- hashCode():I
- f:isRemember():Z
com.intellij.credentialStore.CredentialStore
- a:get(com.intellij.credentialStore.CredentialAttributes):com.intellij.credentialStore.Credentials
- getPassword(com.intellij.credentialStore.CredentialAttributes):java.lang.String
- a:set(com.intellij.credentialStore.CredentialAttributes,com.intellij.credentialStore.Credentials):V
- setPassword(com.intellij.credentialStore.CredentialAttributes,java.lang.String):V
com.intellij.credentialStore.CredentialStoreManager
- sf:Companion:com.intellij.credentialStore.CredentialStoreManager$Companion
- a:availableProviders():java.util.List
- a:defaultProvider():com.intellij.credentialStore.ProviderType
- s:getInstance():com.intellij.credentialStore.CredentialStoreManager
- a:isSupported(com.intellij.credentialStore.ProviderType):Z
f:com.intellij.credentialStore.CredentialStoreManager$Companion
- f:getInstance():com.intellij.credentialStore.CredentialStoreManager
f:com.intellij.credentialStore.Credentials
- <init>(java.lang.String,com.intellij.credentialStore.OneTimeString):V
- b:<init>(java.lang.String,com.intellij.credentialStore.OneTimeString,I,kotlin.jvm.internal.DefaultConstructorMarker):V
- <init>(java.lang.String,java.lang.String):V
- <init>(java.lang.String,B[]):V
- <init>(java.lang.String,C[]):V
- equals(java.lang.Object):Z
- f:getPassword():com.intellij.credentialStore.OneTimeString
- f:getPasswordAsString():java.lang.String
- f:getUserName():java.lang.String
- hashCode():I
e:com.intellij.credentialStore.ProviderType
- java.lang.Enum
- sf:DO_NOT_STORE:com.intellij.credentialStore.ProviderType
- sf:KEEPASS:com.intellij.credentialStore.ProviderType
- sf:KEYCHAIN:com.intellij.credentialStore.ProviderType
- sf:MEMORY_ONLY:com.intellij.credentialStore.ProviderType
- s:getEntries():kotlin.enums.EnumEntries
- s:valueOf(java.lang.String):com.intellij.credentialStore.ProviderType
- s:values():com.intellij.credentialStore.ProviderType[]
a:com.intellij.ide.passwordSafe.PasswordSafe
- com.intellij.credentialStore.CredentialStore
- com.intellij.ide.passwordSafe.PasswordStorage
- sf:Companion:com.intellij.ide.passwordSafe.PasswordSafe$Companion
- <init>():V
- a:getAsync(com.intellij.credentialStore.CredentialAttributes):org.jetbrains.concurrency.Promise
- sf:getInstance():com.intellij.ide.passwordSafe.PasswordSafe
- a:isMemoryOnly():Z
- a:isPasswordStoredOnlyInMemory(com.intellij.credentialStore.CredentialAttributes,com.intellij.credentialStore.Credentials):Z
- a:isRememberPasswordByDefault():Z
- a:set(com.intellij.credentialStore.CredentialAttributes,com.intellij.credentialStore.Credentials,Z):V
- a:setRememberPasswordByDefault(Z):V
f:com.intellij.ide.passwordSafe.PasswordSafe$Companion
- f:getInstance():com.intellij.ide.passwordSafe.PasswordSafe
com.intellij.ide.passwordSafe.PasswordStorage
- a:get(com.intellij.credentialStore.CredentialAttributes):com.intellij.credentialStore.Credentials
- getPassword(com.intellij.openapi.project.Project,java.lang.Class,java.lang.String):java.lang.String
- a:set(com.intellij.credentialStore.CredentialAttributes,com.intellij.credentialStore.Credentials):V
- storePassword(com.intellij.openapi.project.Project,java.lang.Class,java.lang.String,java.lang.String):V

View File

@@ -0,0 +1 @@
kotlin/jvm/internal/DefaultConstructorMarker

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" packagePrefix="com.intellij" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="intellij.platform.util.ex" />
<orderEntry type="module" module-name="intellij.platform.util.base" />
<orderEntry type="module" module-name="intellij.platform.util" />
<orderEntry type="library" name="kotlin-stdlib" level="project" />
<orderEntry type="module" module-name="intellij.platform.core" />
</component>
</module>

View File

@@ -28,6 +28,7 @@
<orderEntry type="module" module-name="intellij.platform.ide.util.io" />
<orderEntry type="library" name="jcef" level="project" />
<orderEntry type="module" module-name="intellij.platform.codeStyle" />
<orderEntry type="module" module-name="intellij.platform.credentialStore" exported="" />
<orderEntry type="module" module-name="intellij.platform.remote.core" exported="" />
<orderEntry type="module" module-name="intellij.platform.ide.core" exported="" />
<orderEntry type="module" module-name="intellij.platform.util.text.matching" />

View File

@@ -1,95 +1,3 @@
f:com.intellij.credentialStore.CredentialAttributes
- <init>(java.lang.String):V
- <init>(java.lang.String,java.lang.String):V
- <init>(java.lang.String,java.lang.String,java.lang.Class):V
- <init>(java.lang.String,java.lang.String,java.lang.Class,Z):V
- b:<init>(java.lang.String,java.lang.String,java.lang.Class,Z,I,kotlin.jvm.internal.DefaultConstructorMarker):V
- <init>(java.lang.String,java.lang.String,java.lang.Class,Z,Z):V
- b:<init>(java.lang.String,java.lang.String,java.lang.Class,Z,Z,I,kotlin.jvm.internal.DefaultConstructorMarker):V
- f:component1():java.lang.String
- f:component2():java.lang.String
- f:component3():java.lang.Class
- f:component4():Z
- f:component5():Z
- f:copy(java.lang.String,java.lang.String,java.lang.Class,Z,Z):com.intellij.credentialStore.CredentialAttributes
- bs:copy$default(com.intellij.credentialStore.CredentialAttributes,java.lang.String,java.lang.String,java.lang.Class,Z,Z,I,java.lang.Object):com.intellij.credentialStore.CredentialAttributes
- equals(java.lang.Object):Z
- f:getCacheDeniedItems():Z
- f:getRequestor():java.lang.Class
- f:getServiceName():java.lang.String
- f:getUserName():java.lang.String
- hashCode():I
- f:isPasswordMemoryOnly():Z
f:com.intellij.credentialStore.CredentialAttributesKt
- sf:SERVICE_NAME_PREFIX:java.lang.String
- sf:generateServiceName(java.lang.String,java.lang.String):java.lang.String
- sf:getACCESS_TO_KEY_CHAIN_DENIED():com.intellij.credentialStore.Credentials
- sf:getCANNOT_UNLOCK_KEYCHAIN():com.intellij.credentialStore.Credentials
- sf:hasOnlyUserName(com.intellij.credentialStore.Credentials):Z
- sf:isEmpty(com.intellij.credentialStore.Credentials):Z
- sf:isFulfilled(com.intellij.credentialStore.Credentials):Z
f:com.intellij.credentialStore.CredentialRequestResult
- <init>(com.intellij.credentialStore.Credentials,Z):V
- f:component1():com.intellij.credentialStore.Credentials
- f:component2():Z
- f:copy(com.intellij.credentialStore.Credentials,Z):com.intellij.credentialStore.CredentialRequestResult
- bs:copy$default(com.intellij.credentialStore.CredentialRequestResult,com.intellij.credentialStore.Credentials,Z,I,java.lang.Object):com.intellij.credentialStore.CredentialRequestResult
- equals(java.lang.Object):Z
- f:getCredentials():com.intellij.credentialStore.Credentials
- hashCode():I
- f:isRemember():Z
com.intellij.credentialStore.CredentialStore
- a:get(com.intellij.credentialStore.CredentialAttributes):com.intellij.credentialStore.Credentials
- getPassword(com.intellij.credentialStore.CredentialAttributes):java.lang.String
- a:set(com.intellij.credentialStore.CredentialAttributes,com.intellij.credentialStore.Credentials):V
- setPassword(com.intellij.credentialStore.CredentialAttributes,java.lang.String):V
com.intellij.credentialStore.CredentialStoreManager
- sf:Companion:com.intellij.credentialStore.CredentialStoreManager$Companion
- a:availableProviders():java.util.List
- a:defaultProvider():com.intellij.credentialStore.ProviderType
- s:getInstance():com.intellij.credentialStore.CredentialStoreManager
- a:isSupported(com.intellij.credentialStore.ProviderType):Z
f:com.intellij.credentialStore.CredentialStoreManager$Companion
- f:getInstance():com.intellij.credentialStore.CredentialStoreManager
f:com.intellij.credentialStore.Credentials
- <init>(java.lang.String,com.intellij.credentialStore.OneTimeString):V
- b:<init>(java.lang.String,com.intellij.credentialStore.OneTimeString,I,kotlin.jvm.internal.DefaultConstructorMarker):V
- <init>(java.lang.String,java.lang.String):V
- <init>(java.lang.String,B[]):V
- <init>(java.lang.String,C[]):V
- equals(java.lang.Object):Z
- f:getPassword():com.intellij.credentialStore.OneTimeString
- f:getPasswordAsString():java.lang.String
- f:getUserName():java.lang.String
- hashCode():I
e:com.intellij.credentialStore.ProviderType
- java.lang.Enum
- sf:DO_NOT_STORE:com.intellij.credentialStore.ProviderType
- sf:KEEPASS:com.intellij.credentialStore.ProviderType
- sf:KEYCHAIN:com.intellij.credentialStore.ProviderType
- sf:MEMORY_ONLY:com.intellij.credentialStore.ProviderType
- s:getEntries():kotlin.enums.EnumEntries
- s:valueOf(java.lang.String):com.intellij.credentialStore.ProviderType
- s:values():com.intellij.credentialStore.ProviderType[]
a:com.intellij.ide.passwordSafe.PasswordSafe
- com.intellij.credentialStore.CredentialStore
- com.intellij.ide.passwordSafe.PasswordStorage
- sf:Companion:com.intellij.ide.passwordSafe.PasswordSafe$Companion
- <init>():V
- a:getAsync(com.intellij.credentialStore.CredentialAttributes):org.jetbrains.concurrency.Promise
- sf:getInstance():com.intellij.ide.passwordSafe.PasswordSafe
- a:isMemoryOnly():Z
- a:isPasswordStoredOnlyInMemory(com.intellij.credentialStore.CredentialAttributes,com.intellij.credentialStore.Credentials):Z
- a:isRememberPasswordByDefault():Z
- a:set(com.intellij.credentialStore.CredentialAttributes,com.intellij.credentialStore.Credentials,Z):V
- a:setRememberPasswordByDefault(Z):V
f:com.intellij.ide.passwordSafe.PasswordSafe$Companion
- f:getInstance():com.intellij.ide.passwordSafe.PasswordSafe
com.intellij.ide.passwordSafe.PasswordStorage
- a:get(com.intellij.credentialStore.CredentialAttributes):com.intellij.credentialStore.Credentials
- getPassword(com.intellij.openapi.project.Project,java.lang.Class,java.lang.String):java.lang.String
- a:set(com.intellij.credentialStore.CredentialAttributes,com.intellij.credentialStore.Credentials):V
- storePassword(com.intellij.openapi.project.Project,java.lang.Class,java.lang.String,java.lang.String):V
e:com.intellij.remote.AuthType
- java.lang.Enum
- sf:KEY_PAIR:com.intellij.remote.AuthType

View File

@@ -1,2 +1 @@
com/google/common/net/HostAndPort
kotlin/jvm/internal/DefaultConstructorMarker

View File

@@ -8,15 +8,16 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Guava" level="project" />
<orderEntry type="library" name="kotlin-stdlib" level="project" />
<orderEntry type="library" scope="RUNTIME" name="slf4j-api" level="project" />
<orderEntry type="library" scope="RUNTIME" name="slf4j-jdk14" level="project" />
<orderEntry type="library" name="kotlin-reflect" level="project" />
<orderEntry type="module" module-name="intellij.platform.core" />
<orderEntry type="module" module-name="intellij.platform.credentialStore" />
<orderEntry type="module" module-name="intellij.platform.util.ex" />
<orderEntry type="module" module-name="intellij.platform.util.jdom" />
<orderEntry type="module" module-name="intellij.platform.ide.util.io" />
<orderEntry type="module" module-name="intellij.platform.projectModel" />
<orderEntry type="library" name="kotlin-stdlib" level="project" />
<orderEntry type="library" name="kotlin-reflect" level="project" />
<orderEntry type="library" name="Guava" level="project" />
<orderEntry type="library" scope="RUNTIME" name="slf4j-api" level="project" />
<orderEntry type="library" scope="RUNTIME" name="slf4j-jdk14" level="project" />
</component>
</module>