Skip to content

Commit

Permalink
chore: bump spring boot to 3.1.4 and remove docker related tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
D-D-H committed Oct 9, 2023
1 parent 7945623 commit d7030f3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 77 deletions.
4 changes: 4 additions & 0 deletions analysis/analysis.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ dependencies {
implementation("com.github.ben-manes.caffeine:guava:3.1.5")
implementation("com.github.ben-manes.caffeine:jcache:3.1.5")
}

test {
jvmArgs('--add-opens=java.base/java.lang=ALL-UNNAMED')
}
9 changes: 1 addition & 8 deletions jifa.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,13 @@
*
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
buildscript {
dependencies {
classpath 'io.spring.gradle:dependency-management-plugin:1.1.0'
classpath 'org.springframework.boot:spring-boot-gradle-plugin:3.1.0'
}
}

plugins {
id 'base'
id 'jacoco-report-aggregation'
id "org.springframework.boot" version "3.1.4"
}

apply from: "$rootDir/gradle/base.gradle"
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'

dependencies {
Expand Down
80 changes: 11 additions & 69 deletions server/server.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,12 @@
*
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
buildscript {
dependencies {
classpath 'io.spring.gradle:dependency-management-plugin:1.1.0'
classpath 'org.springframework.boot:spring-boot-gradle-plugin:3.1.0'
}
}

plugins {
id "com.bmuschko.docker-spring-boot-application" version "9.3.1"
id 'application'
id "org.springframework.boot" version "3.1.4"
}

apply from: "$rootDir/gradle/java.gradle"

apply plugin: 'application'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'

springBoot {
Expand All @@ -35,14 +26,9 @@ dependencies {
implementation project(':common')
implementation project(':analysis')

if (gradle.startParameter.taskNames.size() > 0 &&
!(gradle.startParameter.taskNames[0].toLowerCase().contains("master"))) {
runtimeOnly project(':analysis:heap-dump:provider')
runtimeOnly project(':analysis:gc-log')
runtimeOnly project(':analysis:thread-dump')
}

implementation 'io.kubernetes:client-java:18.0.1'
runtimeOnly project(':analysis:heap-dump:provider')
runtimeOnly project(':analysis:gc-log')
runtimeOnly project(':analysis:thread-dump')

implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-websocket'
Expand All @@ -56,6 +42,8 @@ dependencies {
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
implementation 'org.springframework.retry:spring-retry'

implementation 'io.kubernetes:client-java:18.0.1'

implementation 'com.mysql:mysql-connector-j:8.0.33'
runtimeOnly 'com.h2database:h2:2.2.220'

Expand Down Expand Up @@ -86,12 +74,7 @@ tasks.named("processResources") {
}

// for kryo
applicationDefaultJvmArgs = ['--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED']


import com.bmuschko.gradle.docker.tasks.image.DockerBuildImage
import org.springframework.boot.gradle.tasks.bundling.BootJar
import org.springframework.boot.gradle.tasks.run.BootRun
applicationDefaultJvmArgs = ['--add-opens=java.base/java.lang=ALL-UNNAMED', '--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED']

import java.nio.file.Files
import java.security.KeyPair
Expand Down Expand Up @@ -119,8 +102,10 @@ afterEvaluate {
generateDevKey(projectDir)
}

import org.springframework.boot.gradle.tasks.run.BootRun

static void setJvmOptionsAndDevKeys(BootRun bootRun) {
bootRun.jvmArgs('--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED')
bootRun.jvmArgs('--add-opens=java.base/java.lang=ALL-UNNAMED', '--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED')
bootRun.args('--jifa.public-key=file:' + bootRun.project.projectDir.toPath().resolve('dev_rsa.pub').toAbsolutePath().toString())
bootRun.args('--jifa.private-key=file:' + bootRun.project.projectDir.toPath().resolve('dev_rsa').toAbsolutePath().toString())
}
Expand All @@ -132,49 +117,6 @@ static void setMysqlEnv(BootRun bootRun) {
bootRun.environment('MYSQL_PASSWORD', 'password')
}

def masterArchive = 'jifa-master.jar'
def workerArchive = 'jifa-worker.jar'

tasks.register("masterJar", BootJar) {
group('jifa')
classpath(project.sourceSets.main.runtimeClasspath)
mainClass.convention(mainClassName)
targetJavaVersion.convention(JavaVersion.VERSION_17)

manifest {
attributes('Implementation-Title': 'Eclipse Jifa')
}
archiveFileName = masterArchive
}

tasks.register("workerJar", BootJar) {
group('jifa')
classpath(project.sourceSets.main.runtimeClasspath)
mainClass.convention(mainClassName)
targetJavaVersion.convention(JavaVersion.VERSION_17)

manifest {
attributes('Implementation-Title': 'Eclipse Jifa')
}
archiveFileName = workerArchive
}

tasks.register("masterDocker", DockerBuildImage) {
group('jifa')
inputDir = project.projectDir.getParentFile()
images = ['jifadocker/jifa-master:latest']
buildArgs = ['BUILD_JAR': masterArchive]
dependsOn("masterJar")
}

tasks.register("workerDocker", DockerBuildImage) {
group('jifa')
inputDir = project.projectDir.getParentFile()
images = ['jifadocker/jifa-worker:latest']
buildArgs = ['BUILD_JAR': workerArchive]
dependsOn("workerJar")
}

tasks.register('runStandaloneWorker', BootRun) {
group('jifa')
classpath(project.sourceSets.main.runtimeClasspath)
Expand Down

0 comments on commit d7030f3

Please sign in to comment.