@@ -7,15 +7,15 @@ buildscript {
77 }
88}
99plugins {
10+ id ' maven-publish'
1011 // https://github.com/researchgate/gradle-release
11- id ' net.researchgate.release' version ' 2.8.1 '
12+ id ' net.researchgate.release' version ' 3.0.2 '
1213 id ' io.codearte.nexus-staging' version ' 0.30.0'
1314}
1415
1516apply plugin : ' java'
1617apply plugin : ' de.thetaphi.forbiddenapis'
1718apply plugin : ' jacoco'
18- apply plugin : ' maven'
1919apply plugin : ' signing'
2020apply plugin : ' io.codearte.nexus-staging'
2121
@@ -60,7 +60,7 @@ dependencies {
6060}
6161
6262wrapper {
63- gradleVersion = ' 6.9.2 '
63+ gradleVersion = ' 7.6 '
6464}
6565
6666test {
@@ -93,8 +93,9 @@ task javadocJar(type: Jar) {
9393 from javadoc
9494}
9595
96- artifacts {
97- archives javadocJar, sourcesJar
96+ java {
97+ withJavadocJar()
98+ withSourcesJar()
9899}
99100
100101signing {
@@ -106,6 +107,12 @@ signing {
106107 sign configurations. archives
107108}
108109
110+ release {
111+ git {
112+ requireBranch. set(' master' )
113+ }
114+ }
115+
109116// provide defaults so we do not need to specify them always
110117if (! project. hasProperty(' ossrhUsername' )) {
111118 ext. ossrhUsername = ' '
@@ -114,52 +121,49 @@ if (!project.hasProperty('ossrhPassword')) {
114121 ext. ossrhPassword = ' '
115122}
116123
117- uploadArchives {
118- repositories {
119- mavenDeployer {
120- // noinspection GrUnresolvedAccess
121- beforeDeployment { MavenDeployment deployment -> signing. signPom(deployment) }
122-
123- repository(url : ' https://oss.sonatype.org/service/local/staging/deploy/maven2/' ) {
124- authentication(userName : ossrhUsername, password : ossrhPassword)
125- }
126-
127- snapshotRepository(url : ' https://oss.sonatype.org/content/repositories/snapshots/' ) {
128- authentication(userName : ossrhUsername, password : ossrhPassword)
129- }
130-
131- pom. project {
132- name ' CommonCrawl Document Download'
133- packaging ' jar'
134- // optionally artifactId can be defined here
135- description ' Common utilities I find useful in many of my projects.'
136- url ' https://github.com/centic9/CommonCrawlDocumentDownload'
137-
138- scm {
139- connection ' scm:git@github.com:centic9/CommonCrawlDocumentDownload'
140- developerConnection ' scm:git@github.com:centic9/CommonCrawlDocumentDownload'
141- url ' https://github.com/centic9/CommonCrawlDocumentDownload'
142- }
143-
144- licenses {
145- license {
146- name ' BSD 2-Clause License'
147- url ' https://www.opensource.org/licenses/bsd-license.php'
148- }
124+ publishing {
125+ publications {
126+ maven(MavenPublication ) {
127+ from components. java
128+
129+ pom {
130+ name = ' CommonCrawl Document Download'
131+ description = ' Helper tools to download data from CommonCrawl archives'
132+ url = ' https://github.com/centic9/CommonCrawlDocumentDownload'
133+ licenses {
134+ license {
135+ name = ' BSD 2-Clause "Simplified" License'
136+ url = ' https://github.com/centic9/CommonCrawlDocumentDownload/blob/master/LICENSE.md'
137+ }
138+ }
139+ developers {
140+ developer {
141+ id = ' centic9'
142+ name = ' Dominik Stadler'
143+ }
144+ }
145+ scm {
146+ connection = ' scm:git@github.com:centic9/CommonCrawlDocumentDownload'
147+ developerConnection = ' scm:git@github.com:centic9/CommonCrawlDocumentDownload'
148+ url = ' https://github.com/centic9/CommonCrawlDocumentDownload'
149+ }
150+ }
149151 }
150-
151- developers {
152- developer {
153- id ' centic9 '
154- name ' Dominik Stadler'
155- }
152+ }
153+ repositories {
154+ maven {
155+ // change to point to your repo, e.g. http://my.org/repo
156+ url = layout. buildDirectory. dir(' repo' )
157+ // url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
158+ // authentication(userName: ossrhUsername, password: ossrhPassword)
159+ /* snapshotRepository(url: 'https://oss.sonatype.org/content/repositories/snapshots/') {
160+ authentication(userName: ossrhUsername, password: ossrhPassword)
161+ } */
156162 }
157- }
158163 }
159- }
160164}
161165
162- afterReleaseBuild. dependsOn uploadArchives
166+ // afterReleaseBuild.dependsOn uploadArchives
163167
164168task lookupURLs (type :JavaExec ,dependsOn : compileJava) {
165169 description = ' Reads the current Common Crawl URL index data and extracts all URLs for interesting mime-types or file extensions'
0 commit comments