forked from aws/aws-toolkit-jetbrains
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemp-toolkit-intellij-root-conventions.gradle.kts
More file actions
131 lines (107 loc) · 4.55 KB
/
temp-toolkit-intellij-root-conventions.gradle.kts
File metadata and controls
131 lines (107 loc) · 4.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
// Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import org.gradle.kotlin.dsl.create
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.invoke
import org.gradle.kotlin.dsl.project
import org.gradle.kotlin.dsl.provideDelegate
import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
import org.jetbrains.intellij.platform.gradle.extensions.IntelliJPlatformExtension
import org.jetbrains.intellij.platform.gradle.plugins.project.DownloadRobotServerPluginTask
import org.jetbrains.intellij.platform.gradle.tasks.TestIdeUiTask
import software.aws.toolkits.gradle.ciOnly
import software.aws.toolkits.gradle.intellij.IdeFlavor
import software.aws.toolkits.gradle.intellij.IdeVersions
import software.aws.toolkits.gradle.intellij.ToolkitIntelliJExtension
import software.aws.toolkits.gradle.intellij.toolkitIntelliJ
plugins {
id("toolkit-testing") // Needed so the coverage configurations are present
id("toolkit-detekt")
id("toolkit-publishing-conventions")
id("toolkit-publish-root-conventions")
}
//toolkitIntelliJ.apply {
// val runIdeVariant = providers.gradleProperty("runIdeVariant")
// ideFlavor.set(IdeFlavor.values().firstOrNull { it.name == runIdeVariant.orNull } ?: IdeFlavor.IC)
//}
val remoteRobotPort: String by project
val ideProfile = IdeVersions.ideProfile(project)
val toolkitVersion: String by project
// please check changelog generation logic if this format is changed
// also sync with gateway version
version = "$toolkitVersion.${ideProfile.shortName}"
val resharperDlls = configurations.register("resharperDlls") {
isCanBeConsumed = false
}
val gatewayResources = configurations.register("gatewayResources") {
isCanBeConsumed = false
}
intellijPlatform {
projectName = "aws-toolkit-jetbrains"
instrumentCode = false
}
tasks.prepareSandbox {
val pluginName = intellijPlatform.projectName
from(resharperDlls) {
into(pluginName.map { "$it/dotnet" })
}
from(gatewayResources) {
into(pluginName.map { "$it/gateway-resources" })
}
}
// We have no source in this project, so skip test task
tasks.test {
enabled = false
}
dependencies {
// intellijPlatform {
// val type = toolkitIntelliJ.ideFlavor.map { IntelliJPlatformType.fromCode(it.toString()) }
// val version = toolkitIntelliJ.version()
//
// create(type, version, useInstaller = false)
// }
implementation(project(":plugin-toolkit:jetbrains-core"))
implementation(project(":plugin-toolkit:jetbrains-ultimate"))
project.findProject(":plugin-toolkit:jetbrains-gateway")?.let {
// does this need to be the instrumented variant?
implementation(it)
gatewayResources(project(":plugin-toolkit:jetbrains-gateway", configuration = "gatewayResources"))
}
project.findProject(":plugin-toolkit:jetbrains-rider")?.let {
implementation(it)
resharperDlls(project(":plugin-toolkit:jetbrains-rider", configuration = "resharperDlls"))
}
}
tasks.withType<TestIdeUiTask>().configureEach {
systemProperty("robot-server.port", remoteRobotPort)
// mac magic
systemProperty("ide.mac.message.dialogs.as.sheets", "false")
systemProperty("jbScreenMenuBar.enabled", "false")
systemProperty("apple.laf.useScreenMenuBar", "false")
systemProperty("ide.mac.file.chooser.native", "false")
systemProperty("jb.consents.confirmation.enabled", "false")
// This does some magic in EndUserAgreement.java to make it not show the privacy policy
systemProperty("jb.privacy.policy.text", "<!--999.999-->")
systemProperty("ide.show.tips.on.startup.default.value", false)
systemProperty("aws.telemetry.skip_prompt", "true")
systemProperty("aws.suppress_deprecation_prompt", true)
systemProperty("idea.trust.all.projects", "true")
// These are experiments to enable for UI tests
systemProperty("aws.experiment.connectedLocalTerminal", true)
systemProperty("aws.experiment.dynamoDb", true)
debugOptions {
enabled.set(true)
suspend.set(false)
}
ciOnly {
configure<JacocoTaskExtension> {
// sync with testing-subplugin
// don't instrument sdk, icons, etc.
includes = listOf("software.aws.toolkits.*")
excludes = listOf("software.aws.toolkits.telemetry.*")
// 221+ uses a custom classloader and jacoco fails to find classes
isIncludeNoLocationClasses = true
output = JacocoTaskExtension.Output.TCP_CLIENT // Dump to our jacoco server instead of to a file
}
}
}