-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BATM-5470 Upgrade gradle to version 8.3 (#851)
- Loading branch information
1 parent
6709a8a
commit 6a208b2
Showing
21 changed files
with
2,259 additions
and
424 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 |
---|---|---|
@@ -1,34 +1,7 @@ | ||
apply plugin: "java" | ||
apply plugin: "com.generalbytes.gradle.main" | ||
apply plugin: 'maven-publish' | ||
plugins { | ||
id("shared-build-conventions") | ||
} | ||
|
||
group = projectGroup | ||
version = projectVersion | ||
|
||
publishing { | ||
if (hasGbUploadArtifactory) { | ||
repositories { | ||
maven { | ||
credentials { | ||
username gbArtifactoryUser | ||
password gbArtifactoryPassword | ||
} | ||
url gbArtifactoryUploadUrl | ||
} | ||
} | ||
} | ||
|
||
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
} | ||
} | ||
} | ||
|
||
dependencySubstitutions { | ||
substitute file(batmDependencySubstitutionConfig) | ||
} | ||
dependencyVerifications { | ||
checksums batmDependencyChecksumsConfig | ||
printUnusedAssertions false | ||
} |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
plugins { | ||
id 'groovy-gradle-plugin' | ||
} | ||
|
||
repositories { | ||
gradlePluginPortal() | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
plugins { | ||
id("java") | ||
id("com.generalbytes.gradle.main") | ||
id("shared-publish-conventions") | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
java { | ||
toolchain { | ||
languageVersion.set(JavaLanguageVersion.of(8)) | ||
} | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
options.encoding = "UTF-8" | ||
options.incremental = true | ||
} | ||
|
||
dependencySubstitutions { | ||
substitute file("$project.rootDir/dependencySubstitutions.txt") | ||
} | ||
|
||
tasks.withType(AbstractArchiveTask).configureEach { | ||
preserveFileTimestamps = false | ||
reproducibleFileOrder = true | ||
} | ||
|
||
afterEvaluate { | ||
if (pluginManager.hasPlugin('com.generalbytes.gradle.dependency.verification')) { | ||
dependencyChecksums { | ||
global = true | ||
} | ||
dependencyVerifications { | ||
setConfigurations([]) // effectively turns off all checksum verifications - replaced by gradle's verification-metadata.xml | ||
} | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
buildSrc/src/main/groovy/shared-publish-conventions.gradle
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
plugins { | ||
id("maven-publish") | ||
} | ||
|
||
publishing { | ||
if (hasGbUploadArtifactory()) { | ||
repositories { | ||
maven { | ||
credentials { | ||
username gbArtifactoryUser | ||
password gbArtifactoryPassword | ||
} | ||
url gbArtifactoryUploadUrl | ||
} | ||
} | ||
} | ||
|
||
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
} | ||
} | ||
} | ||
|
||
private boolean hasGbUploadArtifactory() { | ||
return project.hasProperty("gbArtifactoryUploadUrl") | ||
&& project.hasProperty("gbArtifactoryUser") | ||
&& project.hasProperty("gbArtifactoryPassword") | ||
} |
24 changes: 24 additions & 0 deletions
24
buildSrc/src/main/groovy/shared-repositories-ext-conventions.gradle
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
ext { | ||
hasGbArtifactory = hasGbArtifactory() | ||
} | ||
|
||
repositories { | ||
maven { | ||
url = uri("https://jitpack.io") | ||
} | ||
if (hasGbArtifactory) { | ||
maven { | ||
url = uri(project.findProperty("gbArtifactoryUrl").toString()) | ||
credentials { | ||
username = project.findProperty("gbArtifactoryUser").toString() | ||
password = project.findProperty("gbArtifactoryPassword").toString() | ||
} | ||
} | ||
} | ||
} | ||
|
||
private boolean hasGbArtifactory() { | ||
return project.hasProperty('gbArtifactoryUrl') | ||
&& project.hasProperty('gbArtifactoryUser') | ||
&& project.hasProperty('gbArtifactoryPassword') | ||
} |
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,40 +1,11 @@ | ||
apply plugin: "java" | ||
apply plugin: "com.generalbytes.gradle.main" | ||
apply plugin: 'maven-publish' | ||
plugins { | ||
id("shared-build-conventions") | ||
} | ||
|
||
group = projectGroup | ||
version = projectVersion | ||
|
||
|
||
dependencies { | ||
compile(group: 'org.slf4j', name: 'slf4j-api', version: '1.7.28') | ||
testCompile (group: 'junit', name: 'junit', version: '4.13.1') | ||
} | ||
|
||
publishing { | ||
if (hasGbUploadArtifactory) { | ||
repositories { | ||
maven { | ||
credentials { | ||
username gbArtifactoryUser | ||
password gbArtifactoryPassword | ||
} | ||
url gbArtifactoryUploadUrl | ||
} | ||
} | ||
} | ||
|
||
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
} | ||
} | ||
} | ||
|
||
dependencySubstitutions { | ||
substitute file(batmDependencySubstitutionConfig) | ||
} | ||
dependencyVerifications { | ||
checksums batmDependencyChecksumsConfig | ||
printUnusedAssertions false | ||
implementation("org.slf4j:slf4j-api:1.7.28") | ||
testImplementation("junit:junit:4.13.1") | ||
} |
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
Oops, something went wrong.