File tree Expand file tree Collapse file tree 5 files changed +58
-8
lines changed
Expand file tree Collapse file tree 5 files changed +58
-8
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,15 @@ scmVersion {
1313 }
1414}
1515
16+ buildscript {
17+ repositories {
18+ maven { url ' https://plugins.gradle.org/m2' }
19+ }
20+ dependencies {
21+ classpath ' com.diffplug.spotless:spotless-plugin-gradle:7.1.0'
22+ }
23+ }
24+
1625allprojects {
1726 // Apply common project setup
1827 apply from : " ${ project.rootDir} /project.gradle"
Original file line number Diff line number Diff line change @@ -387,4 +387,31 @@ plugins.withType(JavaPlugin).whenPluginAdded {
387387 }
388388}
389389
390+ plugins. apply(' com.diffplug.spotless' )
391+
392+ spotless {
393+ java {
394+ target ' **/*.java'
395+
396+ googleJavaFormat()
397+ licenseHeaderFile rootProject. file(' tools/spotless/openremote-license-header.txt' )
398+ importOrder(' java' , ' javax' , ' com' , ' org' )
399+ removeUnusedImports()
400+ formatAnnotations()
401+ trimTrailingWhitespace()
402+ endWithNewline()
403+ }
404+
405+ typescript {
406+ target ' src/**/*.ts'
407+ targetExclude(
408+ ' src/model.ts' ,
409+ ' src/restclient.ts'
410+ )
411+
412+ eslint(). configFile(rootProject. file(' ui/.eslintrc.json' )). tsconfigFile(rootProject. file(' ui/tsconfig.json' ))
413+ licenseHeaderFile rootProject. file(' tools/spotless/openremote-license-header.txt' ), ' (import|const|declare|export|var) '
414+ }
415+ }
416+
390417// 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 11buildDir = " dist"
22
3- tasks. register(' clean' ) {
4- dependsOn npmClean
5- }
6-
73tasks. register(' installDist' , Copy ) {
84 dependsOn npmBuild
95 mustRunAfter(resolveTask(" :manager:installDist" ))
106 from project. buildDir
117 into " ${ project(':deployment').buildDir} /image/manager/app/${ projectDir.name} "
128}
9+
10+ clean. dependsOn(npmClean)
Original file line number Diff line number Diff line change 11buildDir = " dist"
22
3- tasks. register(' clean' ) {
4- dependsOn npmClean
5- }
6-
73tasks. register(' installDist' , Copy ) {
84 dependsOn npmBuild
95 mustRunAfter(resolveTask(" :manager:installDist" ))
106 from project. buildDir
117 into " ${ project(':deployment').buildDir} /image/manager/app/${ projectDir.name} "
128}
9+
10+ clean. dependsOn(npmClean)
You can’t perform that action at this time.
0 commit comments