-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
71 lines (59 loc) · 1.69 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
plugins {
id 'java'
id 'org.jetbrains.intellij' version '0.4.2'
}
group 'com.hqjl'
version '1.1.1'
sourceCompatibility = 1.8
repositories {
//mavenCentral()
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'https://maven.aliyun.com/repository/jcenter'}
}
dependencies {
compile "org.scala-lang:scala-library:2.11.11"
compile "org.scala-lang:scala-reflect:2.11.11"
compile 'org.apache.velocity:velocity-tools:2.0@jar'
compile 'mysql:mysql-connector-java:5.1.41'
compile 'commons-beanutils:commons-beanutils:1.9.3'
testCompile group: 'junit', name: 'junit', version: '4.12'
}
intellij {
version '2018.3.5'
type 'IU'
intellij.updateSinceUntilBuild false
plugins = ['DatabaseTools', 'Velocity']
}
patchPluginXml {
changeNotes """ use isBoolean instead of getBoolean for get&set method for boolean fields """
}
apply plugin: 'idea'
apply plugin: 'org.jetbrains.intellij'
apply plugin: 'java'
apply plugin: 'scala'
sourceSets {
main {
scala {
srcDirs = ['src/main/scala', 'src/main/java']
}
java {
srcDirs = []
}
}
test {
scala {
srcDirs = ['src/test/scala', 'src/test/java']
}
java {
srcDirs = []
}
}
}
//可选(项目初始化时,可用gradle cDirs生成scala及java的src目录)
task "createDirs" << {
sourceSets*.scala.srcDirs*.each { it.mkdirs() }
sourceSets*.java.srcDirs*.each { it.mkdirs() }
sourceSets*.resources.srcDirs*.each { it.mkdirs() }
}