Skip to content

Commit

Permalink
Upgrade to Gradle 7.6 and Java 11
Browse files Browse the repository at this point in the history
Co-authored-by: ags <[email protected]>
Co-authored-by: Daniel Milnes <[email protected]>
Co-authored-by: DJ <[email protected]>
  • Loading branch information
4 people committed Oct 16, 2024
1 parent 0a1a97a commit 8e768b6
Show file tree
Hide file tree
Showing 6 changed files with 511 additions and 167 deletions.
186 changes: 181 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,185 @@
*.class
build/
# Created by https://www.toptal.com/developers/gitignore/api/java,linux,gradle,intellij
# Edit at https://www.toptal.com/developers/gitignore?templates=java,linux,gradle,intellij

### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

.classpath
# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Intellij Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr

# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
.idea/**/sonarlint/

# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
.idea/**/sonarIssues.xml

# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator-enh.xml
.idea/**/markdown-navigator/

# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
.idea/$CACHE_FILE$

# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml

# Azure Toolkit for IntelliJ plugin
# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
.idea/**/azureSettings.xml

### Java ###
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### Gradle ###
.gradle
**/build/
!src/**/build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Avoid ignore Gradle wrappper properties
!gradle-wrapper.properties

# Cache of project
.gradletasknamecache

# Eclipse Gradle plugin generated files
# Eclipse Core
.project
/bin
# JDT-specific (Eclipse Java Development Tools)
.classpath

### Gradle Patch ###
# Java heap dump
*.hprof

./disruptor-proxy.*
# End of https://www.toptal.com/developers/gitignore/api/java,linux,gradle,intellij
105 changes: 54 additions & 51 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,20 @@
* limitations under the License.
*/

apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'checkstyle'
apply plugin: 'maven'
apply plugin: 'signing'
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id 'checkstyle'
id 'idea'
id "biz.aQute.bnd.builder" version "6.3.1"
}


defaultTasks 'checkstyleTest', 'checkstyleMain', 'build'

group = 'com.lmax'
version = new Version(major: 2, minor: 1, revision: 0)
version = new Version(major: 2, minor: 2, revision: 0)

ext {
fullName = 'Disruptor-Proxy'
Expand All @@ -45,13 +48,15 @@ repositories {
}

dependencies {
testCompile 'junit:junit:4.5', 'org.hamcrest:hamcrest-core:1.3'
compile 'org.javassist:javassist:3.19.0-GA', 'com.lmax:disruptor:3.3.0'
testImplementation 'junit:junit:4.5'
testImplementation 'org.hamcrest:hamcrest-core:1.3'
implementation 'org.javassist:javassist:3.19.0-GA'
implementation 'com.lmax:disruptor:3.3.0'
}


sourceCompatibility = 1.6
targetCompatibility = 1.6
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11

jar {
manifest.attributes('Built-By': System.properties['user.name'],
Expand Down Expand Up @@ -79,57 +84,55 @@ artifacts {
archives sourcesJar, javadocJar
}

task wrapper(type: Wrapper) {
gradleVersion = '2.2'
}

def projectPom = {
name = fullName
description = fullDescription
url = siteUrl

scm {
url = "scm:$sourceUrl"
connection = "scm:$sourceUrl"
}

licenses {
license {
name = 'The Apache Software License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
publishing {
publications {
disruptor(MavenPublication) {
from components.java

pom {
name = project.ext.fullName
description = project.ext.fullDescription
url = project.ext.siteUrl

scm {
url = "scm:${project.ext.sourceUrl}"
connection = "scm:${project.ext.sourceUrl}"
}

licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}

developers {
developer {
id = 'team'
name = teamName
email = '[email protected]'
}
}
}
}
}

developers {
developer {
id = 'team'
name = teamName
email = '[email protected]'
repositories {
maven {
url project.hasProperty('sonatypeUrl') ? project['sonatypeUrl'] : 'https://oss.sonatype.org/service/local/staging/deploy/maven2'

credentials {
username = project.hasProperty('sonatypeUsername') ? project['sonatypeUsername'] : 'fake-user'
password = project.hasProperty('sonatypePassword') ? project['sonatypePassword'] : 'fake-password'
}
}
}
}

install {
repositories.mavenInstaller.pom.project(projectPom)
}

signing {
required { gradle.taskGraph.hasTask('uploadArchives') }
sign configurations.archives
sign publishing.publications.disruptor
}

uploadArchives {
repositories.mavenDeployer {
beforeDeployment { deployment -> signing.signPom(deployment) }

repository(url: sonatypeUrl) {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}

pom.project(projectPom)
}
}


class Version {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
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-4.8.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 8e768b6

Please sign in to comment.