Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert gradle build script to be kotlin based
- Loading branch information
1 parent
c2a53e7
commit c37a415
Showing
4 changed files
with
88 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
import io.pivotal.services.plugin.CfPluginExtension | ||
import io.pivotal.services.plugin.CfService | ||
|
||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
jcenter() | ||
maven { setUrl("https://repo.spring.io/milestone") } | ||
maven { setUrl("https://repo.spring.io/snapshot") } | ||
maven { setUrl("https://dl.bintray.com/kotlin/kotlin-eap-1.1") } | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.4-eap-69") | ||
classpath("com.github.jengelman.gradle.plugins:shadow:2.0.1") | ||
classpath("org.junit.platform:junit-platform-gradle-plugin:1.0.0-RC2") | ||
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.6.RELEASE") | ||
} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
maven { setUrl("https://repo.spring.io/milestone") } | ||
maven { setUrl("https://repo.spring.io/snapshot") } | ||
maven { setUrl("https://dl.bintray.com/kotlin/kotlin-eap-1.1") } | ||
} | ||
|
||
plugins { | ||
id("com.github.pivotalservices.cf-app").version("1.0.9") | ||
} | ||
|
||
apply { | ||
plugin("kotlin") | ||
plugin("org.springframework.boot") | ||
plugin("java") | ||
} | ||
|
||
configure< CfPluginExtension> { | ||
//CF Details | ||
ccHost = "api.local.pcfdev.io" | ||
ccUser = "admin" | ||
ccPassword = "admin" | ||
org = "pcfdev-org" | ||
space = "pcfdev-space" | ||
|
||
//App Details | ||
name = "cf-show-env" | ||
hostName = "cf-show-env" | ||
filePath = "build/libs/cf-show-env-1.0.0-M1.jar" | ||
path = "" | ||
domain = "local.pcfdev.io" | ||
instances = 2 | ||
memory = 1024 | ||
timeout = 180 | ||
|
||
//Env and services | ||
buildpack = "https://github.com/cloudfoundry/java-buildpack.git" | ||
|
||
environment = mapOf( | ||
"JAVA_OPTS" to "-Djava.security.egd=file:/dev/./urandom", | ||
"SPRING_PROFILES_ACTIVE" to "cloud" | ||
) | ||
|
||
cfService(closureOf<CfService> { | ||
name = "p-mysql" | ||
plan = "512mb" | ||
instanceName = "test-db" | ||
}) | ||
|
||
} | ||
dependencies { | ||
val prometheus_client_version = "0.0.21" | ||
compile("org.springframework.boot:spring-boot-starter-actuator") | ||
compile("org.springframework.boot:spring-boot-devtools") | ||
compile("org.springframework.boot:spring-boot-starter-thymeleaf") | ||
compile("org.springframework.boot:spring-boot-starter-web") | ||
compile("com.google.guava:guava:19.0") | ||
compile("org.webjars:bootstrap:3.3.7") | ||
compile("org.webjars:jquery:3.1.1") | ||
compile("io.prometheus:simpleclient:${prometheus_client_version}") | ||
compile("io.prometheus:simpleclient_spring_boot:${prometheus_client_version}") | ||
compile("nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect") | ||
testCompile("org.springframework.boot:spring-boot-starter-test") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
group=org.bk | ||
version=1.0.0-M1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#Tue Apr 19 12:56:51 PDT 2016 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0.2-bin.zip |