-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to Gradle 7.6, start adjusting publishing
- Loading branch information
Showing
5 changed files
with
75 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,15 +7,15 @@ buildscript { | |
} | ||
} | ||
plugins { | ||
id 'maven-publish' | ||
// https://github.com/researchgate/gradle-release | ||
id 'net.researchgate.release' version '2.8.1' | ||
id 'net.researchgate.release' version '3.0.2' | ||
id 'io.codearte.nexus-staging' version '0.30.0' | ||
} | ||
|
||
apply plugin: 'java' | ||
apply plugin: 'de.thetaphi.forbiddenapis' | ||
apply plugin: 'jacoco' | ||
apply plugin: 'maven' | ||
apply plugin: 'signing' | ||
apply plugin: 'io.codearte.nexus-staging' | ||
|
||
|
@@ -60,7 +60,7 @@ dependencies { | |
} | ||
|
||
wrapper { | ||
gradleVersion = '6.9.2' | ||
gradleVersion = '7.6' | ||
} | ||
|
||
test { | ||
|
@@ -93,8 +93,9 @@ task javadocJar(type: Jar) { | |
from javadoc | ||
} | ||
|
||
artifacts { | ||
archives javadocJar, sourcesJar | ||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
signing { | ||
|
@@ -106,6 +107,12 @@ signing { | |
sign configurations.archives | ||
} | ||
|
||
release { | ||
git { | ||
requireBranch.set('master') | ||
} | ||
} | ||
|
||
//provide defaults so we do not need to specify them always | ||
if (!project.hasProperty('ossrhUsername')) { | ||
ext.ossrhUsername = '' | ||
|
@@ -114,52 +121,49 @@ if (!project.hasProperty('ossrhPassword')) { | |
ext.ossrhPassword = '' | ||
} | ||
|
||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
//noinspection GrUnresolvedAccess | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
|
||
repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2/') { | ||
authentication(userName: ossrhUsername, password: ossrhPassword) | ||
} | ||
|
||
snapshotRepository(url: 'https://oss.sonatype.org/content/repositories/snapshots/') { | ||
authentication(userName: ossrhUsername, password: ossrhPassword) | ||
} | ||
|
||
pom.project { | ||
name 'CommonCrawl Document Download' | ||
packaging 'jar' | ||
// optionally artifactId can be defined here | ||
description 'Common utilities I find useful in many of my projects.' | ||
url 'https://github.com/centic9/CommonCrawlDocumentDownload' | ||
|
||
scm { | ||
connection 'scm:[email protected]:centic9/CommonCrawlDocumentDownload' | ||
developerConnection 'scm:[email protected]:centic9/CommonCrawlDocumentDownload' | ||
url 'https://github.com/centic9/CommonCrawlDocumentDownload' | ||
} | ||
|
||
licenses { | ||
license { | ||
name 'BSD 2-Clause License' | ||
url 'https://www.opensource.org/licenses/bsd-license.php' | ||
} | ||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
from components.java | ||
|
||
pom { | ||
name = 'CommonCrawl Document Download' | ||
description = 'Helper tools to download data from CommonCrawl archives' | ||
url = 'https://github.com/centic9/CommonCrawlDocumentDownload' | ||
licenses { | ||
license { | ||
name = 'BSD 2-Clause "Simplified" License' | ||
url = 'https://github.com/centic9/CommonCrawlDocumentDownload/blob/master/LICENSE.md' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'centic9' | ||
name = 'Dominik Stadler' | ||
} | ||
} | ||
scm { | ||
connection = 'scm:[email protected]:centic9/CommonCrawlDocumentDownload' | ||
developerConnection = 'scm:[email protected]:centic9/CommonCrawlDocumentDownload' | ||
url = 'https://github.com/centic9/CommonCrawlDocumentDownload' | ||
} | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id 'centic9 ' | ||
name 'Dominik Stadler' | ||
} | ||
} | ||
repositories { | ||
maven { | ||
// change to point to your repo, e.g. http://my.org/repo | ||
url = layout.buildDirectory.dir('repo') | ||
//url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/' | ||
// authentication(userName: ossrhUsername, password: ossrhPassword) | ||
/* snapshotRepository(url: 'https://oss.sonatype.org/content/repositories/snapshots/') { | ||
authentication(userName: ossrhUsername, password: ossrhPassword) | ||
} */ | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
afterReleaseBuild.dependsOn uploadArchives | ||
//afterReleaseBuild.dependsOn uploadArchives | ||
|
||
task lookupURLs(type:JavaExec,dependsOn: compileJava) { | ||
description = 'Reads the current Common Crawl URL index data and extracts all URLs for interesting mime-types or file extensions' | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.2-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip | ||
networkTimeout=10000 | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters