Skip to content

Commit

Permalink
Merge pull request #200 from Health-Education-England/build/migrateGr…
Browse files Browse the repository at this point in the history
…adleToKotlin

Build/migrate gradle to kotlin
  • Loading branch information
Judge40 authored Dec 20, 2023
2 parents 71bcb57 + 491bcd2 commit eca4cea
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 85 deletions.
82 changes: 0 additions & 82 deletions build.gradle

This file was deleted.

82 changes: 82 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
plugins {
java
id("org.springframework.boot") version "3.2.0"
id("io.spring.dependency-management") version "1.1.4"

// Code quality plugins
checkstyle
jacoco
id("org.sonarqube") version "4.4.1.3373"
}

// TODO: Update group to end with "admin" or "trainee".
group = "uk.nhs.tis"
version = "0.0.1"

configurations {
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
}

repositories {
mavenCentral()
}

dependencies {
// Spring Boot starters
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-web")
testImplementation("org.springframework.boot:spring-boot-starter-test")

// Lombok
compileOnly("org.projectlombok:lombok")
annotationProcessor("org.projectlombok:lombok")

// MapStruct
val mapstructVersion = "1.5.5.Final"
implementation("org.mapstruct:mapstruct:${mapstructVersion}")
annotationProcessor("org.mapstruct:mapstruct-processor:${mapstructVersion}")
testAnnotationProcessor("org.mapstruct:mapstruct-processor:${mapstructVersion}")

// Sentry reporting
val sentryVersion = "7.1.0"
implementation("io.sentry:sentry-spring-boot-starter:$sentryVersion")
implementation("io.sentry:sentry-logback:$sentryVersion")
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
vendor.set(JvmVendorSpec.ADOPTIUM)
}
}

checkstyle {
config = resources.text.fromArchiveEntry(configurations.checkstyle.get().first(), "google_checks.xml")
}

sonarqube {
properties {
property("sonar.host.url", "https://sonarcloud.io")
property("sonar.login", System.getenv("SONAR_TOKEN"))
property("sonar.organization", "health-education-england")
// TODO: Update sonar.projectKey to real value.
property("sonar.projectKey", "Health-Education-England_tis-microservice-template")

property("sonar.java.checkstyle.reportPaths",
"build/reports/checkstyle/main.xml,build/reports/checkstyle/test.xml")
}
}

tasks.jacocoTestReport {
reports {
html.required.set(true)
xml.required.set(true)
}
}

tasks.test {
finalizedBy(tasks.jacocoTestReport)
useJUnitPlatform()
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 0 additions & 2 deletions settings.gradle

This file was deleted.

2 changes: 2 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// TODO: Update project name.
rootProject.name = "tis-microservice-template"

0 comments on commit eca4cea

Please sign in to comment.