You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
129 lines
3.7 KiB
Groovy
129 lines
3.7 KiB
Groovy
buildscript {
|
|
ext {
|
|
springBootVersion = '2.5.5'
|
|
javaCfEnvVersion = '2.1.2.RELEASE'
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
credentials {
|
|
username System.getenv("ARTIFACTORY_USERNAME") ?: "$artifactory_username"
|
|
password System.getenv("ARTIFACTORY_PASSWORD") ?: "$artifactory_password"
|
|
}
|
|
url 'https://gapinc.jfrog.io/gapinc/maven-repos'
|
|
}
|
|
ivy {
|
|
credentials {
|
|
username System.getenv("ARTIFACTORY_USERNAME") ?: "$artifactory_username"
|
|
password System.getenv("ARTIFACTORY_PASSWORD") ?: "$artifactory_password"
|
|
}
|
|
layout "maven"
|
|
url 'https://gapinc.jfrog.io/gapinc/maven-repos'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
|
|
}
|
|
}
|
|
|
|
group = 'springmusic'
|
|
|
|
apply plugin: 'java'
|
|
|
|
apply plugin: 'eclipse-wtp'
|
|
apply plugin: 'idea'
|
|
|
|
apply plugin: 'org.springframework.boot'
|
|
apply plugin: 'io.spring.dependency-management'
|
|
|
|
version = {
|
|
def stdout = new ByteArrayOutputStream()
|
|
|
|
exec {
|
|
executable 'sh'
|
|
args 'version.sh'
|
|
standardOutput = stdout
|
|
}
|
|
|
|
return stdout.toString().trim()
|
|
}()
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
// Spring Boot
|
|
implementation "org.springframework.boot:spring-boot-starter-web"
|
|
implementation "org.springframework.boot:spring-boot-starter-actuator"
|
|
implementation "org.springframework.boot:spring-boot-starter-data-jpa"
|
|
implementation "org.springframework.boot:spring-boot-starter-data-mongodb"
|
|
implementation "org.springframework.boot:spring-boot-starter-data-redis"
|
|
implementation "org.springframework.boot:spring-boot-starter-validation"
|
|
|
|
// Java CfEnv
|
|
implementation "io.pivotal.cfenv:java-cfenv-boot:${javaCfEnvVersion}"
|
|
|
|
// JPA Persistence
|
|
runtimeOnly "org.apache.commons:commons-pool2:2.6.0"
|
|
runtimeOnly "com.h2database:h2"
|
|
runtimeOnly "mysql:mysql-connector-java"
|
|
runtimeOnly "org.postgresql:postgresql"
|
|
runtimeOnly "com.microsoft.sqlserver:mssql-jdbc"
|
|
|
|
// uncomment to use Lettuce instead of Jedis for Redis connections
|
|
// runtime "io.lettuce:lettuce-core"
|
|
|
|
// Webjars
|
|
implementation "org.webjars:bootstrap:3.1.1"
|
|
implementation "org.webjars:angularjs:1.2.16"
|
|
implementation "org.webjars:angular-ui:0.4.0-2"
|
|
implementation "org.webjars:angular-ui-bootstrap:0.10.0-1"
|
|
implementation "org.webjars:jquery:2.1.0-2"
|
|
|
|
// Oracle - uncomment one of the following after placing driver in ./libs
|
|
// compile files('libs/ojdbc8.jar')
|
|
// compile files('libs/ojdbc7.jar')
|
|
|
|
// Testing
|
|
testImplementation "junit:junit"
|
|
testImplementation "org.springframework.boot:spring-boot-starter-test"
|
|
}
|
|
|
|
java {
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
if (JavaVersion.current() != project.targetCompatibility) {
|
|
logger.warn("The build is using Java ${JavaVersion.current()} to build a Java ${project.targetCompatibility} compatible archive.")
|
|
logger.warn("See the project README for instructions on changing the target Java version.")
|
|
}
|
|
}
|
|
|
|
jar {
|
|
archiveBaseName = "spring-music"
|
|
}
|
|
uploadArchives {
|
|
repositories {
|
|
maven {
|
|
credentials {
|
|
username System.getenv('ARTIFACTORY_USERNAME')
|
|
password System.getenv('ARTIFACTORY_PASSWORD')
|
|
}
|
|
url 'https://gapinc.jfrog.io/gapinc/maven-repos'
|
|
}
|
|
}
|
|
}
|
|
|
|
uploadBootArchives {
|
|
repositories {
|
|
maven {
|
|
credentials {
|
|
username System.getenv('ARTIFACTORY_USERNAME')
|
|
password System.getenv('ARTIFACTORY_PASSWORD')
|
|
}
|
|
url "https://gapinc.jfrog.io/gapinc/maven-repos"
|
|
}
|
|
}
|
|
}
|