Sfoglia il codice sorgente

gradle配置文件提交

hanqingsong 3 anni fa
parent
commit
610bafe330
3 ha cambiato i file con 37 aggiunte e 2 eliminazioni
  1. 2 2
      .gitignore
  2. 33 0
      build.gradle
  3. 2 0
      settings.gradle

+ 2 - 2
.gitignore

@@ -33,5 +33,5 @@ build/
33
 .vscode/
33
 .vscode/
34
 
34
 
35
 ### gradle ###
35
 ### gradle ###
36
-*.gradle
37
-/build/**
36
+/.gradle/
37
+/build/

+ 33 - 0
build.gradle

@@ -0,0 +1,33 @@
1
+plugins {
2
+    id 'java'
3
+}
4
+
5
+group 'com.sainyu.beidou3.demo'
6
+version '1.0-SNAPSHOT'
7
+
8
+repositories {
9
+    mavenCentral()
10
+}
11
+
12
+dependencies {
13
+    implementation fileTree(dir: 'libs', include: ['*.jar'])
14
+    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
15
+    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
16
+}
17
+
18
+test {
19
+    useJUnitPlatform()
20
+}
21
+
22
+// my config
23
+apply plugin: 'java'
24
+apply plugin: 'application'
25
+mainClassName = 'com.sainyu.beidou3.demo.SocketFrame'
26
+//清除上次的编译过的文件
27
+task clearPj(type:Delete){
28
+    delete 'build','target'
29
+}
30
+// 未经检查或不安全的操作,使用 -Xlint:unchecked 重新编译
31
+tasks.withType(JavaCompile) {
32
+    options.compilerArgs << "-Xlint:unchecked" << "-Werror"
33
+}

+ 2 - 0
settings.gradle

@@ -0,0 +1,2 @@
1
+rootProject.name = 'Beidou2Demo'
2
+