-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
129 lines (112 loc) · 3.92 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
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
plugins {
id 'java-library'
id 'application'
id 'maven-publish'
id "io.freefair.aspectj" version '6.6.3'
id 'org.jreleaser' version '1.16.0'
}
group 'io.github.thanglequoc'
version '1.0.3'
java {
withJavadocJar()
withSourcesJar()
sourceCompatibility = "11"
targetCompatibility = "11"
}
repositories {
mavenCentral()
}
dependencies {
implementation group: 'org.aspectj', name: 'aspectjrt', version: '[1.9.19,)'
implementation group: 'org.slf4j', name: 'slf4j-api', version: '[2.0.7,)'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.15.2'
testImplementation group: 'ch.qos.logback', name: 'logback-core', version: '1.4.6'
testImplementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.4.6'
}
test {
useJUnitPlatform()
jvmArgs("-XX:+EnableDynamicAgentLoading")
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'timer-ninja'
from components.java
pom {
name = 'Timer Ninja'
description = 'Timer Ninja is a lightweight Java library for measuring method execution time with ease. It provides annotation-based tracking and a flexible API to measure execution time, supports different time units, and visualizes the tracking context in stacktrace tree format.'
url = 'https://github.com/ThangLeQuoc/timer-ninja'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'thanglequoc'
name = 'Thang Le Quoc'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/ThangLeQuoc/timer-ninja.git'
developerConnection = 'scm:git:ssh://github.com/ThangLeQuoc/timer-ninja.git'
url = 'https://github.com/ThangLeQuoc/timer-ninja'
}
}
}
}
repositories {
maven {
url = layout.buildDirectory.dir('staging-deploy')
}
mavenLocal()
}
}
jreleaser {
project {
name = 'timer-ninja'
authors = ['ThangLeQuoc']
maintainers = ['ThangLeQuoc']
license = 'Apache-2.0'
links {
homepage = 'https://github.com/ThangLeQuoc/timer-ninja'
}
description = 'A handy Java utility to help you measure execution time of Java code'
longDescription = 'Timer Ninja is a brainless Java library to evaluate your Java code method execution time. Timer Ninja follows the Aspect Oriented Programming (AOP) concept, backed by AspectJ, to make it super simple to declare tracker on method.'
}
deploy {
maven {
mavenCentral {
sonatype {
active = 'ALWAYS'
url = 'https://central.sonatype.com/api/v1/publisher'
username = 'changeit'
password = 'changeit'
authorization = 'BEARER'
sign = true
stagingRepository('build/staging-deploy')
}
}
}
}
signing {
active = 'RELEASE'
armored = true
mode = 'FILE'
files = true
artifacts = true
checksums = true
passphrase = 'changeit'
publicKey = './public_key.asc'
secretKey = './secret_key.asc'
}
}
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}