Skip to content

Commit 053b4fa

Browse files
committed
Update to Gradle 7.6, start adjusting publishing
1 parent 5cd4a00 commit 053b4fa

File tree

5 files changed

+75
-57
lines changed

5 files changed

+75
-57
lines changed

build.gradle

Lines changed: 50 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ buildscript {
77
}
88
}
99
plugins {
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

1516
apply plugin: 'java'
1617
apply plugin: 'de.thetaphi.forbiddenapis'
1718
apply plugin: 'jacoco'
18-
apply plugin: 'maven'
1919
apply plugin: 'signing'
2020
apply plugin: 'io.codearte.nexus-staging'
2121

@@ -60,7 +60,7 @@ dependencies {
6060
}
6161

6262
wrapper {
63-
gradleVersion = '6.9.2'
63+
gradleVersion = '7.6'
6464
}
6565

6666
test {
@@ -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

100101
signing {
@@ -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
110117
if (!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

164168
task 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'

gradle/wrapper/gradle-wrapper.jar

2.32 KB
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
4+
networkTimeout=10000
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

gradlew

Lines changed: 14 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 9 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)