@@ -10,9 +10,15 @@ plugins {
10
10
id ' java-library'
11
11
id ' com.google.protobuf' version ' 0.8.12'
12
12
id ' idea'
13
+ id ' maven'
13
14
id ' maven-publish'
15
+ id ' signing'
14
16
}
15
17
18
+ group = ' com.eventstore'
19
+ version = ' 0.1'
20
+ // archivesBaseName = 'eventstoredb-client-java'
21
+
16
22
dependencies {
17
23
implementation " javax.annotation:javax.annotation-api:${ annotationApiVersion} "
18
24
implementation " javax.validation:validation-api:${ validationApiVersion} "
@@ -56,23 +62,95 @@ protobuf {
56
62
}
57
63
}
58
64
59
- publishing {
65
+ task javadocJar (type : Jar ) {
66
+ archiveClassifier = ' javadoc'
67
+ from javadoc
68
+ }
69
+
70
+ task sourcesJar (type : Jar ) {
71
+ archiveClassifier = ' sources'
72
+ from sourceSets. main. allSource
73
+ }
74
+
75
+ artifacts {
76
+ archives javadocJar, sourcesJar
77
+ }
78
+
79
+ signing {
80
+ useGpgCmd()
81
+ sign configurations. archives
82
+ }
83
+
84
+ uploadArchives {
60
85
repositories {
61
- maven {
62
- name = " GitHubPackages"
63
- url = uri(" https://maven.pkg.github.com/EventStore/EventStoreDB-Client-Java" )
64
- credentials {
65
- username = System . getenv(" GITHUB_ACTOR" )
66
- password = System . getenv(" GITHUB_TOKEN" )
86
+ mavenDeployer {
87
+ beforeDeployment { MavenDeployment deployment -> signing. signPom(deployment) }
88
+
89
+ repository(url : " https://oss.sonatype.org/service/local/staging/deploy/maven2/" ) {
90
+ authentication(userName : ossrhUsername, password : ossrhPassword)
91
+ }
92
+
93
+ snapshotRepository(url : " https://oss.sonatype.org/content/repositories/snapshots/" ) {
94
+ authentication(userName : ossrhUsername, password : ossrhPassword)
95
+ }
96
+
97
+ pom. project {
98
+ name ' EventStoreDB Client Java'
99
+ packaging ' jar'
100
+ // optionally artifactId can be defined here
101
+ description ' EventStoreDB gRPC Java client'
102
+ url ' https://eventstore.com'
103
+
104
+ scm {
105
+ connection ' https://github.com/EventStore/EventStoreDB-Client-Java.git'
106
+ developerConnection ' https://github.com/EventStore/EventStoreDB-Client-Java.git'
107
+ url ' https://github.com/EventStore/EventStoreDB-Client-Java'
108
+ }
109
+
110
+ licenses {
111
+ license {
112
+ name ' The Apache License, Version 2.0'
113
+ url ' http://www.apache.org/licenses/LICENSE-2.0.txt'
114
+ }
115
+ }
116
+
117
+ developers {
118
+ developer {
119
+ id ' ylaupa'
120
+ name ' Yorick Laupa'
121
+
122
+ }
123
+ }
67
124
}
68
- }
69
- }
70
- publications {
71
- Snapshot (MavenPublication ) {
72
- from(components. java)
73
125
}
74
126
}
75
127
}
76
128
129
+
130
+ // publishing {
131
+ // publications {
132
+ // Snapshot(MavenPublication) {
133
+ // from(components.java)
134
+ // }
135
+ // }
136
+ //
137
+ // repositories {
138
+ // maven {
139
+ // url = 'https://oss.sonatype.org/content/repositories/snapshots'
140
+ // }
141
+ // }
142
+ //
143
+ // // repositories {
144
+ // // maven {
145
+ // // name = "GitHubPackages"
146
+ // // url = uri("https://maven.pkg.github.com/EventStore/EventStoreDB-Client-Java")
147
+ // // credentials {
148
+ // // username = System.getenv("GITHUB_ACTOR")
149
+ // // password = System.getenv("GITHUB_TOKEN")
150
+ // // }
151
+ // // }
152
+ // // }
153
+ // }
154
+
77
155
sourceCompatibility = JavaVersion . VERSION_1_8
78
- targetCompatibility = JavaVersion . VERSION_1_8
156
+ targetCompatibility = JavaVersion . VERSION_1_8
0 commit comments