-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
143 lines (118 loc) · 4.7 KB
/
build.gradle
File metadata and controls
143 lines (118 loc) · 4.7 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
/*
* This build file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java Library project to get you started.
* For more details take a look at the Java Libraries chapter in the Gradle
* user guide available at https://docs.gradle.org/4.4.1/userguide/java_library_plugin.html
*/
// Apply the java-library plugin to add support for Java Library
apply plugin: 'java-library'
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'signing'
group = "ch.weetech"
archivesBaseName = "common-java"
version = "0.0.12"
// In this section you declare where to find the dependencies of your project
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
dependencies {
// This dependency is exported to consumers, that is to say found on their compile classpath.
//api 'org.apache.commons:commons-math3:3.6.1'
// This dependency is used internally, and not exposed to consumers on their own compile classpath.
//implementation 'com.google.guava:guava:31.1-jre'
// https://mvnrepository.com/artifact/javax.mail/javax.mail-api
//implementation 'javax.mail:javax.mail-api:1.6.2'
// https://mvnrepository.com/artifact/javax.activation/activation
//implementation 'javax.activation:activation:1.1'
implementation 'com.sun.mail:jakarta.mail:1.6.7'
// https://mvnrepository.com/artifact/org.slf4j/slf4j-api
implementation 'org.slf4j:slf4j-api:1.7.36'
// https://mvnrepository.com/artifact/com.mysql/mysql-connector-j
implementation 'com.mysql:mysql-connector-j:9.1.0'
// JUnit 5 (jupiter) and mockito dependencies
// Since the mockito-inline library replaced the mockito-core library it is possible to mock final classes and static methods
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.9.3'
testImplementation 'org.mockito:mockito-inline:4.11.0'
// Note that junit-jupiter-engine is the main JUnit 5 library, and junit-platform-launcher is used with the Maven plugin and IDE launcher.
testImplementation 'org.junit.platform:junit-platform-launcher:1.9.3'
// Maven Surefire plugin to run our test classes using the new JUnit platform launcher
testImplementation 'org.junit.platform:junit-platform-surefire-provider:1.3.2'
// JUnit4 (vintage) compatible, for IDEs that have no support for JUnit 5 yet, let's include these dependencies
testImplementation 'org.junit.platform:junit-platform-runner:1.9.3'
testImplementation 'org.junit.vintage:junit-vintage-engine:5.9.3'
// Mockito provides an implementation for JUnit5 extensions in the library mockito-junit-jupiter
testImplementation 'org.mockito:mockito-junit-jupiter:4.11.0'
// power mockito does not work with junit5 yet
//testImplementation 'org.powermock:powermock-api-mockito2:2.0.7'
}
test {
useJUnitPlatform()
}
//---- dump all current dependencies to dependencies dir
task copyDependencies(type: Copy) {
from configurations.compileClasspath
into 'dependencies'
}
//---- dump all current dependencies to dependencies dir
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhToken, password: ossrhTokenPassword)
}
snapshotRepository(url: "https://s01.oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhToken, password: ossrhTokenPassword)
}
pom.project {
name 'common-java'
packaging 'jar'
// optionally artifactId can be defined here
description 'java common utilities'
url 'https://github.com/jasonwee/common_java'
scm {
connection 'scm:git:git://github.com/jasonwee/common_java.git'
developerConnection 'scm:git:ssh://github.com:jasonwee/common_java.git'
url 'https://github.com/jasonwee/common_java.git'
}
licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'jasonwee'
name 'Jason Wee'
email 'jason@weetech.ch'
}
}
}
}
}
}
eclipse {
classpath {
downloadJavadoc = true
downloadSources = true
}
}