Browse Source

添加编辑器格式化配置

huxz 7 years ago
parent
commit
2d27209f63
2 changed files with 29 additions and 13 deletions
  1. 17 0
      .editorconfig
  2. 12 13
      build.gradle

+ 17 - 0
.editorconfig

@@ -0,0 +1,17 @@
+root = true
+
+[*]
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.{js,gradle}]
+indent_style = space
+indent_size = 2
+continuation_indent_size = 4
+
+[*.java]
+indent_style = space
+indent_size = 4
+continuation_indent_size = 8
+spaces_around_operators = true

+ 12 - 13
build.gradle

@@ -1,22 +1,21 @@
-
 allprojects {
-    group = 'com.uas.sso'
-    version = '0.0.1-SNAPSHOT'
+  group = 'com.uas.sso'
+  version = '0.0.1-SNAPSHOT'
 
-    apply plugin: 'maven'
+  apply plugin: 'maven'
 }
 
 subprojects {
-    apply plugin: 'java'
-    sourceCompatibility = 1.8
+  apply plugin: 'java'
+  sourceCompatibility = 1.8
 
-    repositories {
-        /*mavenLocal()*/
+  repositories {
+    /*mavenLocal()*/
 
-        jcenter()
-        maven { url "http://113.105.74.141:8081/artifactory/libs-release" }
-        maven { url "http://113.105.74.141:8081/artifactory/libs-snapshot" }
-    }
+    jcenter()
+    maven { url 'http://113.105.74.141:8081/artifactory/libs-release' }
+    maven { url "http://113.105.74.141:8081/artifactory/libs-snapshot" }
+  }
 
-    [compileJava, compileTestJava, javadoc]*.options*.encoding = 'UTF-8'
+  [compileJava, compileTestJava, javadoc]*.options*.encoding = 'UTF-8'
 }