File tree Expand file tree Collapse file tree 4 files changed +56
-4
lines changed Expand file tree Collapse file tree 4 files changed +56
-4
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,15 @@ scmVersion {
13
13
}
14
14
}
15
15
16
+ buildscript {
17
+ repositories {
18
+ maven { url ' https://plugins.gradle.org/m2' }
19
+ }
20
+ dependencies {
21
+ classpath ' com.diffplug.spotless:spotless-plugin-gradle:7.0.3'
22
+ }
23
+ }
24
+
16
25
allprojects {
17
26
// Apply common project setup
18
27
apply from : " ${ project.rootDir} /project.gradle"
Original file line number Diff line number Diff line change @@ -389,4 +389,31 @@ plugins.withType(JavaPlugin).whenPluginAdded {
389
389
}
390
390
}
391
391
392
+ plugins. apply(' com.diffplug.spotless' )
393
+
394
+ spotless {
395
+ java {
396
+ target ' **/*.java'
397
+
398
+ googleJavaFormat()
399
+ licenseHeaderFile rootProject. file(' tools/spotless/openremote-license-header.txt' )
400
+ importOrder(' java' , ' javax' , ' com' , ' org' )
401
+ removeUnusedImports()
402
+ formatAnnotations()
403
+ trimTrailingWhitespace()
404
+ endWithNewline()
405
+ }
406
+
407
+ typescript {
408
+ target ' src/**/*.ts'
409
+ targetExclude(
410
+ ' src/model.ts' ,
411
+ ' src/restclient.ts'
412
+ )
413
+
414
+ eslint(). configFile(rootProject. file(' ui/.eslintrc.json' )). tsconfigFile(rootProject. file(' ui/tsconfig.json' ))
415
+ licenseHeaderFile rootProject. file(' tools/spotless/openremote-license-header.txt' ), ' (import|const|declare|export|var) '
416
+ }
417
+ }
418
+
392
419
// POM generator
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright $YEAR, OpenRemote Inc.
3
+ *
4
+ * This program is free software: you can redistribute it and/or modify
5
+ * it under the terms of the GNU Affero General Public License as
6
+ * published by the Free Software Foundation, either version 3 of the
7
+ * License, or (at your option) any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License
15
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ *
17
+ * SPDX-License-Identifier: AGPL-3.0-or-later
18
+ */
Original file line number Diff line number Diff line change 1
1
buildDir = " dist"
2
2
3
- tasks. register(' clean' ) {
4
- dependsOn npmClean
5
- }
6
-
7
3
tasks. register(' installDist' , Copy ) {
8
4
dependsOn npmBuild
9
5
mustRunAfter(resolveTask(" :manager:installDist" ))
10
6
from project. buildDir
11
7
into " ${ project(':deployment').buildDir} /image/manager/app/${ projectDir.name} "
12
8
}
9
+
10
+ clean. dependsOn(npmClean)
You can’t perform that action at this time.
0 commit comments