@@ -34,9 +34,6 @@ To debug in IntelliJ Idea, open the 'Maven Projects' tool window (View
34
34
version = " 2022.10"
35
35
36
36
project {
37
- buildType(UnitTestsLinux )
38
- buildType(UnitTestsWindows )
39
-
40
37
description = " Gradle plugin for building plugins for IntelliJ-based IDEs – https://github.com/JetBrains/gradle-intellij-plugin"
41
38
42
39
features {
@@ -46,52 +43,45 @@ project {
46
43
repositoryURL = " https://github.com/JetBrains/gradle-intellij-plugin"
47
44
}
48
45
}
49
- }
50
46
51
- fun BuildType. configure ( family : String ) = {
47
+ val operatingSystems = listOf ( " Linux " , " Windows " , " macOS " )
52
48
val gradleVersions = listOf (" 7.3" , " 7.6.1" , " 8.0.1" )
53
49
54
- name = " Unit Tests ($family )"
55
-
56
- vcs {
57
- root(DslContext .settingsRoot)
58
- }
50
+ operatingSystems.forEach { os ->
51
+ buildType {
52
+ id(" UnitTests${os.uppercase()} " )
53
+ name = " Unit Tests ($os )"
59
54
60
- steps {
61
- gradleVersions.forEach { gradleVersion ->
62
- gradle {
63
- name = " Unit Tests – Gradle $gradleVersion "
64
- tasks = " check -PtestGradleVersion=$gradleVersion "
55
+ vcs {
56
+ root(DslContext .settingsRoot)
65
57
}
66
- }
67
- }
68
58
69
- triggers {
70
- vcs {
71
- }
72
- }
59
+ steps {
60
+ gradleVersions.forEach { gradleVersion ->
61
+ gradle {
62
+ name = " Unit Tests – Gradle $gradleVersion "
63
+ tasks = " check -PtestGradleVersion=$gradleVersion "
64
+ }
65
+ }
66
+ }
73
67
74
- features {
75
- commitStatusPublisher {
76
- publisher = github {
77
- githubUrl = " https://api.github.com"
78
- authType = personalToken {
79
- token = " credentialsJSON:935e7750-4963-410f-8aab-e86748770a1f"
68
+ features {
69
+ commitStatusPublisher {
70
+ publisher = github {
71
+ githubUrl = " https://api.github.com"
72
+ authType = personalToken {
73
+ token = " credentialsJSON:935e7750-4963-410f-8aab-e86748770a1f"
74
+ }
75
+ }
76
+ param(" github_oauth_user" , " hsz" )
80
77
}
81
78
}
82
- param(" github_oauth_user" , " hsz" )
83
- }
84
- }
85
79
86
- requirements {
87
- add {
88
- equals(" teamcity.agent.jvm.os.family" , family)
80
+ requirements {
81
+ add {
82
+ equals(" teamcity.agent.jvm.os.family" , os)
83
+ }
84
+ }
89
85
}
90
86
}
91
87
}
92
- object UnitTestsLinux : BuildType({
93
- this.configure("Linux ")
94
- })
95
- object UnitTestsWindows : BuildType({
96
- this.configure("Windows ")
97
- })
0 commit comments