@@ -35,18 +35,22 @@ configurations.create(BackendConfigurations.REMIGRATE_BACKEND_CONFIGURATION_NAME
35
35
extensions.create<CI >(" ci" , project)
36
36
37
37
abstract class CI (val _project : Project ) {
38
+ @Suppress(" unused" )
38
39
fun determineCI () {
39
40
if (System .getenv(" CI" ).toBoolean()) {
40
41
_project .extra[" ciBuild" ] = true
41
42
} else {
42
43
_project .extra[" ciBuild" ] = _project .hasProperty(" teamcity" )
43
44
}
44
45
}
45
-
46
+
47
+ @Suppress(" unused" )
46
48
fun isCI () = _project .extra[" ciBuild" ]
47
-
49
+
50
+ @Suppress(" unused" )
48
51
fun buildNumber () = System .getenv(" GITHUB_RUN_NUMBER" ).toIntOrNull() ? : System .getenv(" BUILD_NUMBER" ).toInt()
49
-
52
+
53
+ @Suppress(" unused" )
50
54
fun registerDependencyRepositories (repositories : ArrayList <String >) {
51
55
for (repoUrl in repositories) {
52
56
_project .repositories.maven {
@@ -63,6 +67,7 @@ abstract class CI(val _project: Project) {
63
67
extensions.create<JDK >(" jdk" , project)
64
68
65
69
abstract class JDK (val _project : Project ) {
70
+ @Suppress(" unused" )
66
71
fun determine (javaVersion : JavaVersion ) {
67
72
if (_project .extra.has(" java${javaVersion} _home" )) {
68
73
_project .extra[" jdk_home" ] = _project .extra.get(" java${javaVersion} _home" )
@@ -87,10 +92,13 @@ abstract class JDK(val _project: Project) {
87
92
}
88
93
}
89
94
90
- extensions.create<Itemis >(" itemis" ,buildscript )
95
+ extensions.create<Itemis >(" itemis" )
91
96
92
- abstract class Itemis (val bs : ScriptHandler ) {
97
+ abstract class Itemis () {
98
+ @Suppress(" unused" )
93
99
fun mbeddrGitHub () = " https://maven.pkg.github.com/mbeddr/*"
100
+
101
+ @Suppress(" unused" )
94
102
fun itemisNexus () = " https://artifacts.itemis.cloud/repository/maven-mps/"
95
103
}
96
104
@@ -139,17 +147,20 @@ tasks.named("clean") {
139
147
140
148
extensions.create<GitHubAuth >(" githubAuth" , project)
141
149
142
- abstract class GitHubAuth (val _project : Project ) {
150
+ abstract class GitHubAuth (_project : Project ) {
143
151
val user: String? = (_project .findProperty(" github_username" ) ? : System .getenv(" GITHUB_ACTOR" ))?.toString()
144
152
val token: String? = (_project .findProperty(" github_token" ) ? : System .getenv(" GITHUB_TOKEN" ))?.toString()
145
153
}
146
154
147
155
extensions.create<Directories >(" directories" ,project)
148
156
149
157
abstract class Directories (val _project : Project ) {
158
+ @Suppress(" unused" )
150
159
fun artifactsDir () :File = _project .file(" ${_project .layout.projectDirectory} /artifacts" )
151
-
160
+
161
+ @Suppress(" unused" )
152
162
fun scriptFile (name : String ):File = _project .file(" ${_project .layout.projectDirectory} /scripts/$name " )
153
-
163
+
164
+ @Suppress(" unused" )
154
165
fun jnLibraryPath ():File = File (_project .extra[" mpsHomeDir" ].toString(), " lib/jna/${System .getProperty(" os.arch" )} " )
155
166
}
0 commit comments