Skip to content

Commit

Permalink
[starter eel] AT-1851 Android community subproject: non-default proje…
Browse files Browse the repository at this point in the history
…ct repo setup with multiple git repositories

GitOrigin-RevId: 17a2cfe54f4dfa00209f6b4ae25b81db0c3a72bc
  • Loading branch information
Nikita-Kudrin authored and intellij-monorepo-bot committed Feb 11, 2025
1 parent d4cdd70 commit 3d38bd6
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import com.intellij.ide.starter.utils.FileSystem
import com.intellij.ide.starter.utils.HttpClient
import com.intellij.openapi.util.SystemInfo
import com.intellij.util.io.copyRecursively
import kotlin.io.path.exists
import org.gradle.internal.hash.Hashing
import java.nio.file.Path
import kotlin.io.path.div
import kotlin.io.path.exists
import kotlin.io.path.isDirectory
import kotlin.time.Duration.Companion.minutes

Expand Down Expand Up @@ -107,11 +107,18 @@ class AndroidFramework(testContext: IDETestContext) : Framework(testContext) {
}

fun downloadAndroidPluginProjectForIJCommunity(intellijCommunityVersion: String, commit: String = "") {
val android = GitProjectInfo("ssh://[email protected]/ij/android.git", commit, intellijCommunityVersion, true).downloadAndUnpackProject()
val communityProjectHome = testContext.resolvedProjectHome
val androidProject = GitProjectInfo("ssh://[email protected]/ij/android.git", commit, intellijCommunityVersion, true)
.apply { downloadAndUnpackProject() }

// TODO: Hack because of https://youtrack.jetbrains.com/issue/AT-2013/Eel-in-Starter-Make-GitProjectInfo-and-Git-aware-of-target-eel
val communityProjectHome = if (testContext.testCase.projectInfo is GitProjectInfo) {
testContext.testCase.projectInfo.repositoryRootDir
}
else testContext.resolvedProjectHome

val androidPluginPath = communityProjectHome / "android"
if (androidPluginPath.exists()) return // TODO find better solution
android.copyRecursively(androidPluginPath)
androidProject.repositoryRootDir.copyRecursively(androidPluginPath)
}

fun setupAndroidSdkToProject(androidSdkPath: Path) {
Expand Down

0 comments on commit 3d38bd6

Please sign in to comment.