Skip to content

Commit b7715bf

Browse files
committed
add build.gradle
1 parent 6555158 commit b7715bf

File tree

3 files changed

+73
-0
lines changed

3 files changed

+73
-0
lines changed

core/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
*.iml
44
*~
55
/dependency-reduced-pom.xml
6+
/.gradle
7+
/build

core/build.gradle

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
plugins {
2+
id 'java'
3+
id 'maven'
4+
id 'signing'
5+
}
6+
7+
group = "com.github.h908714124"
8+
archivesBaseName = "jbock"
9+
10+
repositories {
11+
mavenCentral()
12+
}
13+
14+
dependencies {
15+
compile 'com.squareup:javapoet:1.11.1'
16+
compile 'com.github.h908714124:jbock-annotations:2.2'
17+
testCompile 'com.google.testing.compile:compile-testing:0.15'
18+
testImplementation 'org.junit.jupiter:junit-jupiter:5.5.0-M1'
19+
}
20+
21+
22+
test {
23+
useJUnitPlatform()
24+
testLogging {
25+
events "passed", "skipped", "failed"
26+
}
27+
}
28+
29+
task javadocJar(type: Jar) {
30+
classifier = 'javadoc'
31+
from javadoc
32+
}
33+
34+
task sourcesJar(type: Jar) {
35+
classifier = 'sources'
36+
from sourceSets.main.allSource
37+
}
38+
39+
artifacts {
40+
archives javadocJar, sourcesJar
41+
}
42+
43+
signing {
44+
sign configurations.archives
45+
}
46+
47+
// https://central.sonatype.org/pages/gradle.html
48+
uploadArchives {
49+
repositories {
50+
mavenDeployer {
51+
beforeDeployment { deployment -> signing.signPom(deployment) }
52+
53+
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
54+
authentication(userName: project.properties['ossrhUsername'], password: project.properties['ossrhPassword'])
55+
}
56+
57+
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
58+
authentication(userName: project.properties['ossrhUsername'], password: project.properties['ossrhPassword'])
59+
}
60+
61+
pom.project {
62+
name 'jbock'
63+
packaging 'jar'
64+
artifactId 'jbock'
65+
description 'The jbock annotation processor'
66+
url 'https://github.com/h908714124/jbock'
67+
}
68+
}
69+
}
70+
}

core/gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version=0-SNAPSHOT

0 commit comments

Comments
 (0)