2019-10-31 21:43:47 -04:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
url "https://plugins.gradle.org/m2/"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
dependencies {
|
2022-06-21 14:26:14 -04:00
|
|
|
classpath "org.shipkit:shipkit:2.3.5"
|
2019-10-31 21:43:47 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
id 'java'
|
|
|
|
}
|
|
|
|
|
2024-01-15 13:57:48 -05:00
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
|
2019-10-31 21:43:47 -04:00
|
|
|
apply from: 'aplugin.gradle'
|
|
|
|
apply plugin: 'org.shipkit.bintray-release'
|
|
|
|
|
|
|
|
|
|
|
|
//hello task
|
|
|
|
task hello {
|
|
|
|
doLast {
|
|
|
|
println 'Baeldung'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//Groovy in gradle task
|
|
|
|
task toLower {
|
|
|
|
doLast {
|
|
|
|
String someString = 'HELLO FROM BAELDUNG'
|
|
|
|
println "Original: " + someString
|
|
|
|
println "Lower case: " + someString.toLowerCase()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Task dependencies
|
|
|
|
task helloGradle {
|
|
|
|
doLast {
|
|
|
|
println 'Hello Gradle!'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task fromBaeldung(dependsOn: helloGradle) {
|
|
|
|
doLast {
|
|
|
|
println "I'm from Baeldung"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//Adding behavior to a task via api
|
|
|
|
task helloBaeldung {
|
|
|
|
doLast {
|
|
|
|
println 'I will be executed second'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
helloBaeldung.doFirst {
|
|
|
|
println 'I will be executed first'
|
|
|
|
}
|
|
|
|
|
|
|
|
helloBaeldung.doLast {
|
|
|
|
println 'I will be executed third'
|
|
|
|
}
|
|
|
|
|
|
|
|
helloBaeldung {
|
|
|
|
doLast {
|
|
|
|
println 'I will be executed fourth'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//Adding extra task properties
|
|
|
|
task ourTask {
|
|
|
|
ext.theProperty = "theValue"
|
|
|
|
}
|
|
|
|
|
|
|
|
task printTaskProperty {
|
|
|
|
doLast {
|
|
|
|
println ourTask.theProperty
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//Declaring dependencies
|
|
|
|
dependencies {
|
2022-06-21 14:26:14 -04:00
|
|
|
implementation group:
|
2019-10-31 21:43:47 -04:00
|
|
|
'org.springframework', name: 'spring-core', version: '4.3.5.RELEASE'
|
2022-06-21 14:26:14 -04:00
|
|
|
implementation 'org.springframework:spring-core:4.3.5.RELEASE',
|
2019-10-31 21:43:47 -04:00
|
|
|
'org.springframework:spring-aop:4.3.5.RELEASE'
|
2022-06-21 14:26:14 -04:00
|
|
|
implementation(
|
2019-10-31 21:43:47 -04:00
|
|
|
[group: 'org.springframework', name: 'spring-core', version: '4.3.5.RELEASE'],
|
|
|
|
[group: 'org.springframework', name: 'spring-aop', version: '4.3.5.RELEASE']
|
|
|
|
)
|
2024-02-26 03:04:48 -05:00
|
|
|
testImplementation('org.hibernate.orm:hibernate-core:6.4.2.Final') {
|
2019-10-31 21:43:47 -04:00
|
|
|
transitive = true
|
|
|
|
}
|
2024-02-26 03:04:48 -05:00
|
|
|
runtimeOnly(group: 'org.hibernate.orm', name: 'hibernate-core', version: '6.4.2.Final') {
|
2019-10-31 21:43:47 -04:00
|
|
|
transitive = false
|
|
|
|
}
|
2022-06-21 14:26:14 -04:00
|
|
|
runtimeOnly "org.codehaus.groovy:groovy-all:2.4.11@jar"
|
|
|
|
runtimeOnly group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.4.11', ext: 'jar'
|
|
|
|
|
|
|
|
implementation fileTree(dir: 'libs', include: '*.jar')
|
2019-10-31 21:43:47 -04:00
|
|
|
}
|