Skip to content

Commit

Permalink
Update gradle to 8.3, usable by GitHub CodeQL.
Browse files Browse the repository at this point in the history
Signed-off-by: Philip R. Kensche <[email protected]>
  • Loading branch information
vinjana committed Apr 5, 2024
1 parent e609b85 commit 8f6f34d
Show file tree
Hide file tree
Showing 5 changed files with 255 additions and 155 deletions.
49 changes: 31 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
import org.gradle.api.JavaVersion

/*
* Copyright (c) 2017 German Cancer Research Center (DKFZ).
*
* Distributed under the MIT License (license terms are at https://www.github.com/theroddywms/Roddy/LICENSE.txt).
*/

plugins {
id 'org.ajoberstar.grgit' version '1.7.2'
id 'org.ajoberstar.grgit' version '4.1.1'
id 'org.cyclonedx.bom' version '1.8.2'
id 'maven-publish'
id 'pmd'
}

apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: 'application'
apply plugin: 'maven'

group = "com.github.theroddywms"

mainClassName = 'de.dkfz.roddy.BEIntegrationTestStarter'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

/*
* Gets the version name from the current Git tag. If the current commit is not tagged,
Expand Down Expand Up @@ -71,21 +77,27 @@ dependencies {
implementation 'com.github.bbottema:jetbrains-runtime-annotations:1.0.1'
}

task writePom {
doLast {
pom {
project {
version rootProject.version
inceptionYear '2017'
model {
tasks.generatePomFileForMavenJavaPublication {
destination = file("$buildDir/pom.xml")
}
}

publishing {
publications {
mavenJava(org.gradle.api.publish.maven.MavenPublication) {
from components.java
pom {
name = 'BatchEuphoria'
url = "https://www.github.com/theroddywms/BatchEuphoria"
licenses {
license {
name 'MIT License'
url 'https://raw.githubusercontent.com/eilslabs/BatchEuphoria/master/LICENSE'
distribution 'repo'
name = 'MIT License'
url = 'https://raw.githubusercontent.com/eilslabs/BatchEuphoria/master/LICENSE'
}
}
}
}.writeTo("$buildDir/pom.xml")
}
}
}

Expand All @@ -94,13 +106,13 @@ jar {

manifest {
attributes("Implementation-Vendor": "German Cancer Research Center (DKFZ)")
attributes("Implementation-Title": baseName)
attributes("Implementation-Title": archiveBaseName.get())
attributes 'Implementation-Version': rootProject.version
}

dependsOn writePom
into("META-INF/maven/$project.group/$project.name") {
from "$buildDir/pom.xml"
from generatePomFileForMavenJavaPublication
// from "$buildDir/pom.xml"
}

}
Expand All @@ -114,7 +126,8 @@ task listJars {

task uberjar(type: Jar, dependsOn:[':compileJava',':compileGroovy']) {
from files(sourceSets.main.output.dirs)
from configurations.runtime.asFileTree.files.collect { zipTree(it) }
from configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
// .asFileTree.files.collect { zipTree(it) }

version = getVersionName()

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 8f6f34d

Please sign in to comment.