-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcommon.gradle
More file actions
69 lines (53 loc) · 1.67 KB
/
common.gradle
File metadata and controls
69 lines (53 loc) · 1.67 KB
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
//
// This file is to be applied to every subproject.
//
apply plugin: 'java'
apply plugin: 'maven'
String mavenGroupId = '1'
String mavenVersion = '1.0-SNAPSHOT'
//sourceCompatibility = '1.8'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
repositories {
mavenCentral();
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
}
dependencies {
compile group: 'com.google.guava', name: 'guava', version: '22.0'
compile group: 'org.apache.commons', name: 'commons-math3', version: '3.5'
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.22'
compile group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.22'
compile group: 'com.typesafe.akka', name: 'akka-actor_2.13', version: '2.6.5'
testCompile group: 'junit', name: 'junit', version: '4.10'
}
String mavenArtifactId = name
group = mavenGroupId
version = mavenVersion
task sourcesJar(type: Jar, dependsOn: classes, description: 'Creates a jar from the source files.') {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives jar
archives sourcesJar
}
configure(install.repositories.mavenInstaller) {
pom.project {
groupId = mavenGroupId
artifactId = mavenArtifactId
version = mavenVersion
}
}
task copyToLib(type: Copy) {
into "$buildDir/output/lib"
from configurations.runtime
}
task createFolders(description: 'Creates the source folders if they do not exist.') doLast {
sourceSets*.allSource*.srcDirs*.each { File srcDir ->
if (!srcDir.isDirectory()) {
println "Creating source folder: ${srcDir}"
srcDir.mkdirs()
}
}
}