Skip to content

Commit 41dabb8

Browse files
Merge remote-tracking branch 'JetBrains/master'
# Conflicts: # kotlin-dsl/UnityStep.xml # plugin-unity-agent/src/main/kotlin/jetbrains/buildServer/unity/logging/UnityLoggingListener.kt
2 parents f1828d8 + 4b45274 commit 41dabb8

68 files changed

Lines changed: 767 additions & 230 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ indent_size = 4
1010

1111
[*.{kt,kts}]
1212
ktlint_code_style = ktlint_official
13-
ktlint_standard_no-wildcard-imports = disabled
13+
ktlint_standard_no-wildcard-imports = disabled
14+
ktlint_standard_trailing-comma-on-call-site = disabled

.teamcity/settings.kts

Lines changed: 16 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,32 @@
11
import jetbrains.buildServer.configs.kotlin.BuildType
2+
import jetbrains.buildServer.configs.kotlin.DslContext
23
import jetbrains.buildServer.configs.kotlin.buildFeatures.PullRequests
34
import jetbrains.buildServer.configs.kotlin.buildFeatures.commitStatusPublisher
45
import jetbrains.buildServer.configs.kotlin.buildFeatures.pullRequests
56
import jetbrains.buildServer.configs.kotlin.buildSteps.gradle
67
import jetbrains.buildServer.configs.kotlin.buildSteps.kotlinFile
78
import jetbrains.buildServer.configs.kotlin.project
89
import jetbrains.buildServer.configs.kotlin.triggers.vcs
9-
import jetbrains.buildServer.configs.kotlin.vcs.GitVcsRoot
1010
import jetbrains.buildServer.configs.kotlin.version
1111

12-
version = "2024.03"
12+
version = "2026.1"
1313

1414
project {
15-
vcsRoot(TagReleaseVcs)
16-
vcsRoot(PullRequestVcs)
17-
vcsRoot(MasterVcs)
18-
1915
buildType(ReleaseBuildConfiguration)
20-
buildType(PullRequestBuildConfiguration)
2116
buildType(MasterBuildConfiguration)
2217
}
2318

24-
object TagReleaseVcs : GitVcsRoot({
25-
id("TeamCityUnityPlugin_TagReleaseVcs")
26-
name = "TagReleaseVcs"
27-
url = "https://github.com/JetBrains/teamcity-unity-plugin.git"
28-
branch = "master"
29-
useTagsAsBranches = true
30-
branchSpec = """
31-
+:refs/(tags/*)
32-
-:<default>
33-
""".trimIndent()
34-
})
35-
3619
object ReleaseBuildConfiguration : BuildType({
3720
id("TeamCityUnityPlugin_ReleaseBuild")
38-
name = "ReleaseBuild"
21+
name = "Unity Plugin: release build"
3922

4023
params {
4124
password("env.ORG_GRADLE_PROJECT_jetbrains.marketplace.token", "credentialsJSON:1a57eff8-4658-4747-a7ff-e6cdbb3dbb6e", readOnly = true)
4225
}
4326

4427
vcs {
45-
root(TagReleaseVcs)
28+
root(DslContext.settingsRoot)
29+
branchFilter = "+:tags/*"
4630
}
4731

4832
steps {
@@ -70,31 +54,24 @@ object ReleaseBuildConfiguration : BuildType({
7054
}
7155
})
7256

73-
object PullRequestVcs : GitVcsRoot({
74-
id("TeamCityUnityPlugin_PullRequestVcs")
75-
name = "PullRequestVcs"
76-
url = "https://github.com/JetBrains/teamcity-unity-plugin.git"
77-
branchSpec = """
78-
-:<default>
79-
""".trimIndent()
80-
})
57+
object MasterBuildConfiguration : BuildType({
58+
id("TeamCityUnityPlugin_MasterBuild")
59+
name = "Unity Plugin: master and PRs"
8160

82-
object PullRequestBuildConfiguration : BuildType({
83-
id("TeamCityUnityPlugin_PullRequestBuild")
84-
name = "PullRequestBuild"
61+
allowExternalStatus = true
8562

86-
val githubTokenParameter = "GITHUB_TOKEN"
87-
params {
88-
password(githubTokenParameter, "credentialsJSON:da577601-ec6c-4387-8996-e14771fe5ca2", readOnly = true)
63+
vcs {
64+
root(DslContext.settingsRoot)
8965
}
9066

91-
vcs {
92-
root(PullRequestVcs)
67+
val githubTokenParameter = "GITHUB_TOKEN"
68+
params {
69+
password(githubTokenParameter, "credentialsJSON:c2a1efe4-4a6e-4908-a12b-f61147f8028d", readOnly = true)
9370
}
9471

9572
features {
9673
pullRequests {
97-
vcsRootExtId = PullRequestVcs.id?.value
74+
vcsRootExtId = DslContext.settingsRoot.id?.value
9875
provider = github {
9976
filterTargetBranch = "refs/heads/master"
10077
filterAuthorRole = PullRequests.GitHubRoleFilter.MEMBER_OR_COLLABORATOR
@@ -104,7 +81,7 @@ object PullRequestBuildConfiguration : BuildType({
10481
}
10582
}
10683
commitStatusPublisher {
107-
vcsRootExtId = PullRequestVcs.id?.value
84+
vcsRootExtId = DslContext.settingsRoot.id?.value
10885
publisher = github {
10986
githubUrl = "https://api.github.com"
11087
authType = personalToken {
@@ -126,37 +103,6 @@ object PullRequestBuildConfiguration : BuildType({
126103
tasks = "clean build serverPlugin"
127104
}
128105
}
129-
})
130-
131-
object MasterVcs : GitVcsRoot({
132-
id("TeamCityUnityPlugin_MasterVcs")
133-
name = "MasterVcs"
134-
url = "https://github.com/JetBrains/teamcity-unity-plugin.git"
135-
branch = "master"
136-
})
137-
138-
object MasterBuildConfiguration : BuildType({
139-
id("TeamCityUnityPlugin_MasterBuild")
140-
name = "MasterBuild"
141-
142-
allowExternalStatus = true
143-
144-
vcs {
145-
root(MasterVcs)
146-
}
147-
148-
triggers {
149-
vcs {
150-
branchFilter = "+:*"
151-
}
152-
}
153-
154-
steps {
155-
gradle {
156-
name = "build"
157-
tasks = "clean build serverPlugin"
158-
}
159-
}
160106

161107
artifactRules = "+:./plugin-unity-server/build/distributions/plugin-unity-server.zip"
162108
})

kotlin-dsl/UnityStep.xml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,16 @@
2828
The class should be located in the Assets/Editor project directory.
2929
</description>
3030
</param>
31+
<param name="buildProfile" dslName="buildProfile">
32+
<description>
33+
Specify the project-relative path to a Unity Build Profile asset
34+
(e.g. Assets/Settings/Build Profiles/Android-Release.asset).
35+
When set, -activeBuildProfile is used instead of -buildTarget.
36+
Requires Unity 6 (6000.x) or later.
37+
</description>
38+
</param>
3139
<param name="buildTarget" dslName="buildTarget">
32-
<description>Specify an active build target before loading the project.</description>
40+
<description>Specify an active build target before loading the project. Not used when Build Profile is set.</description>
3341
</param>
3442
<param name="buildPlayer" dslName="buildPlayer" type="compound">
3543
<option name="">
@@ -44,7 +52,12 @@
4452
<option name="Windows" value="buildWindowsPlayer"/>
4553
<option name="Windows64" value="buildWindows64Player"/>
4654
</param>
47-
<param name="buildPlayerPath" dslName="playerPath"/>
55+
<param name="buildPlayerPath" dslName="playerPath">
56+
<description>
57+
Specify the output path for the player binary. When Build Profile is set, this path is passed
58+
to -build instead of -buildPlayer.
59+
</description>
60+
</param>
4861
<param name="runEditorTests" type="compound" dslName="runTests">
4962
<option name="editorTests" value="true">
5063
<description>Run editor tests from the project</description>

plugin-unity-agent/src/main/kotlin/jetbrains/buildServer/unity/BuildCommandExecutionAdapter.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
package jetbrains.buildServer.unity
42

53
import jetbrains.buildServer.agent.BuildFinishedStatus

plugin-unity-agent/src/main/kotlin/jetbrains/buildServer/unity/UnityBuildSessionFactory.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
package jetbrains.buildServer.unity
42

53
import jetbrains.buildServer.agent.AgentBuildRunnerInfo

plugin-unity-agent/src/main/kotlin/jetbrains/buildServer/unity/UnityCommandBuildSession.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
package jetbrains.buildServer.unity
42

53
import jetbrains.buildServer.agent.BuildFinishedStatus

0 commit comments

Comments
 (0)