Skip to content

Commit

Permalink
Update gradle version and build.gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
MinusKube committed Oct 12, 2022
1 parent 0649103 commit b05f927
Show file tree
Hide file tree
Showing 6 changed files with 465 additions and 94 deletions.
101 changes: 78 additions & 23 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,60 @@
# Created by https://www.toptal.com/developers/gitignore/api/java,gradle,intellij+all
# Edit at https://www.toptal.com/developers/gitignore?templates=java,gradle,intellij+all

# Created by https://www.gitignore.io/api/java,gradle,intellij

### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
### Intellij+all ###
# 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

.idea
# 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-debug/
cmake-build-*/

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

## File-based project format:
# File-based project format
*.iws

## Plugin-specific files:

# IntelliJ
/out/
out/

# mpeltonen/sbt-idea plugin
.idea_modules/
Expand All @@ -30,22 +65,29 @@ 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

### Intellij Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
# Editor-based Rest Client
.idea/httpRequests

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Intellij+all Patch ###
# Ignore everything but code style settings and run configurations
# that are supposed to be shared within teams.

.idea/*

# Sonarlint plugin
.idea/sonarlint
!.idea/codeStyles
!.idea/runConfigurations

### Java ###
# Compiled class file
Expand All @@ -63,28 +105,41 @@ fabric.properties
# 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*

### Gradle ###
.gradle
/build/
**/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

# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties
# Eclipse Gradle plugin generated files
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath

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

# End of https://www.gitignore.io/api/java,gradle,intellij
# End of https://www.toptal.com/developers/gitignore/api/java,gradle,intellij+all
130 changes: 62 additions & 68 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
plugins {
id 'com.github.johnrengelman.shadow' version '5.2.0'
id 'com.github.johnrengelman.shadow' version '7.1.2'
}

subprojects {
apply plugin: 'java-library'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'java-library'

sourceCompatibility = '1.8'

Expand All @@ -22,86 +20,25 @@ subprojects {
implementation 'org.slf4j:slf4j-simple:1.7.25'
}

task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}

task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}

artifacts { archives javadocJar, sourcesJar }


task copyJar(type: Copy, dependsOn: shadowJar) {
from shadowJar
into '../build'
}

shadowJar.finalizedBy copyJar

signing {
sign configurations.archives
}

uploadArchives {
repositories {
mavenDeployer {
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 'Netherboard'
packaging 'jar'
description 'Scoreboard API for your Minecraft Sponge and Bukkit Plugins.'
url 'https://github.com/MinusKube/Netherboard'

scm {
connection 'scm:git:git://github.com/MinusKube/Netherboard.git'
developerConnection 'scm:git:ssh://github.com:MinusKube/Netherboard.git'
url 'http://github.com/MinusKube/Netherboard/tree/master'
}

licenses {
license {
name 'GNU General Public License v3.0'
url 'https://www.gnu.org/licenses/gpl-3.0.en.html'
}
}

developers {
developer {
id 'minuskube'
name 'MinusKube'
email '[email protected]'
}
}
}
}
}
}
}

project(':core') {
shadowJar {
archiveName = 'Netherboard-API-' + project.version + '.jar'
archiveFileName = 'Netherboard-API-' + project.version + '.jar'
}

archivesBaseName = 'netherboard-core'
}

project(':bukkit') {
shadowJar {
archiveName = 'Netherboard-Bukkit-' + project.version + '.jar'
archiveFileName = 'Netherboard-Bukkit-' + project.version + '.jar'
}

archivesBaseName = 'netherboard-bukkit'
Expand All @@ -120,7 +57,7 @@ project(':bukkit') {

project(':sponge') {
shadowJar {
archiveName = 'Netherboard-Sponge-' + project.version + '.jar'
archiveFileName = 'Netherboard-Sponge-' + project.version + '.jar'
}

archivesBaseName = 'netherboard-sponge'
Expand All @@ -135,3 +72,60 @@ project(':sponge') {
api project(':core')
}
}

subprojects {
apply plugin: 'signing'
apply plugin: 'maven-publish'

java {
withJavadocJar()
withSourcesJar()
}

publishing {
publications {
mavenJava(MavenPublication) {
artifactId = archivesBaseName

pom {
name = 'Netherboard'
description = 'Scoreboard API for your Minecraft Sponge and Bukkit Plugins.'
url = 'https://github.com/MinusKube/Netherboard'

licenses {
license {
name = 'Apache License v2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0'
}
}

developers {
developer {
id = 'minuskube'
name = 'MinusKube'
email = '[email protected]'
}
}

scm {
connection = 'scm:git:git://github.com/MinusKube/Netherboard.git'
developerConnection = 'scm:git:ssh://github.com:MinusKube/Netherboard.git'
url = 'http://github.com/MinusKube/Netherboard/tree/master'
}
}
}
}

repositories {
maven {
def releasesRepoUrl = layout.buildDirectory.dir('https://oss.sonatype.org/service/local/staging/deploy/maven2/')
def snapshotsRepoUrl = layout.buildDirectory.dir('https://oss.sonatype.org/content/repositories/snapshots/')
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}
}

signing {
sign publishing.publications.mavenJava
}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 2 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Wed Jun 10 01:50:36 CEST 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit b05f927

Please sign in to comment.