Convert gradle build scripts to groovy
This commit is contained in:
parent
287a101962
commit
981163b9bb
4 changed files with 74 additions and 99 deletions
44
api/build.gradle
Normal file
44
api/build.gradle
Normal file
|
@ -0,0 +1,44 @@
|
|||
apply plugin: 'java'
|
||||
apply plugin: 'kotlin'
|
||||
apply plugin: 'application'
|
||||
apply plugin: "io.spring.dependency-management"
|
||||
apply plugin: "org.springframework.boot"
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
maven {
|
||||
url = "http://repo.maven.apache.org/maven2"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.springframework.boot:spring-boot-starter-data-jpa"
|
||||
implementation "org.springframework.boot:spring-boot-starter-security"
|
||||
implementation "org.springframework.session:spring-session-jdbc"
|
||||
implementation "org.springframework.boot:spring-boot-starter-web"
|
||||
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.9.8"
|
||||
implementation "org.jetbrains.kotlin:kotlin-reflect:1.3.61"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61"
|
||||
implementation "io.springfox:springfox-swagger2:2.8.0"
|
||||
implementation "io.springfox:springfox-swagger-ui:2.8.0"
|
||||
runtimeOnly "mysql:mysql-connector-java:8.0.15"
|
||||
testImplementation "org.springframework.boot:spring-boot-starter-test"
|
||||
testImplementation "org.springframework.security:spring-security-test:5.1.5.RELEASE"
|
||||
}
|
||||
|
||||
jar {
|
||||
description = "twigs-server"
|
||||
}
|
||||
|
||||
mainClassName = "com.wbrawner.budgetserver.BudgetServerApplicationKt"
|
||||
|
||||
sourceCompatibility = 11
|
||||
targetCompatibility = 11
|
||||
|
||||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
||||
kotlinOptions {
|
||||
jvmTarget = '11'
|
||||
}
|
||||
}
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
import java.net.URI
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
// maven {
|
||||
// url = URI("https://repo.maven.apache.org/maven2")
|
||||
// }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61")
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
java
|
||||
kotlin("jvm") version "1.3.61"
|
||||
id("org.springframework.boot") version "2.2.4.RELEASE"
|
||||
}
|
||||
|
||||
apply(plugin = "io.spring.dependency-management")
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
maven {
|
||||
url = URI("http://repo.maven.apache.org/maven2")
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
|
||||
implementation("org.springframework.boot:spring-boot-starter-security")
|
||||
implementation("org.springframework.session:spring-session-jdbc")
|
||||
implementation("org.springframework.boot:spring-boot-starter-web")
|
||||
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.9.8")
|
||||
implementation("org.jetbrains.kotlin:kotlin-reflect:1.3.61")
|
||||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61")
|
||||
implementation("io.springfox:springfox-swagger2:2.8.0")
|
||||
implementation("io.springfox:springfox-swagger-ui:2.8.0")
|
||||
runtimeOnly("mysql:mysql-connector-java:8.0.15")
|
||||
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
||||
testImplementation("org.springframework.security:spring-security-test:5.1.5.RELEASE")
|
||||
}
|
||||
|
||||
description = "twigs-server"
|
||||
|
||||
val mainClass = "com.wbrawner.budgetserver.BudgetServerApplication"
|
||||
tasks.bootJar {
|
||||
mainClassName = mainClass
|
||||
}
|
||||
|
||||
tasks.bootRun {
|
||||
main = mainClass
|
||||
}
|
30
build.gradle
Normal file
30
build.gradle
Normal file
|
@ -0,0 +1,30 @@
|
|||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
maven { url "http://repo.spring.io/snapshot" }
|
||||
maven { url "http://repo.spring.io/milestone" }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72"
|
||||
classpath "org.springframework.boot:spring-boot-gradle-plugin:2.2.2.RELEASE"
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'java'
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
maven { url "http://repo.spring.io/snapshot" }
|
||||
maven { url "http://repo.spring.io/milestone" }
|
||||
maven { url "http://repo.maven.apache.org/maven2" }
|
||||
}
|
||||
|
||||
jar {
|
||||
group = "com.wbrawner"
|
||||
archiveVersion.set("0.0.1-SNAPSHOT")
|
||||
}
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
import java.net.URI
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61")
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
java
|
||||
kotlin("jvm") version "1.3.61"
|
||||
id("org.springframework.boot") version "2.2.4.RELEASE"
|
||||
}
|
||||
|
||||
apply(plugin = "io.spring.dependency-management")
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
maven {
|
||||
url = URI("http://repo.maven.apache.org/maven2")
|
||||
}
|
||||
}
|
||||
group = "com.wbrawner"
|
||||
version = "0.0.1-SNAPSHOT"
|
||||
|
||||
sourceSets.getByName("main") {
|
||||
java.srcDir("src/main/kotlin")
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile> {
|
||||
kotlinOptions.jvmTarget = "14"
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue