Last active
September 28, 2015 18:26
-
-
Save arose13/74469c7a30f8ac134372 to your computer and use it in GitHub Desktop.
This is a base build.gradle for a Heroku spring-boot-gradle application
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
// Variables | |
def javaVersionLang = 1.8 | |
// Buildscript | |
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.2.6.RELEASE") | |
} | |
} | |
// All Required Plugins for local and production running | |
apply plugin: 'java' | |
apply plugin: 'eclipse' | |
apply plugin: 'idea' | |
apply plugin: 'spring-boot' | |
apply plugin: 'maven' | |
mainClassName = 'PUT.YOUR.MAIN.CLASS.PATH.HERE' | |
jar { | |
baseName = 'NAME' | |
version = 'VERSION-NUMBER' | |
} | |
sourceCompatibility = javaVersionLang | |
targetCompatibility = javaVersionLang | |
dependencies { | |
} | |
task wrapper(type: Wrapper) { | |
gradleVersion = '2.6' | |
} | |
/* This task generates the pom.xml file that Heroku needs to build the app. | |
NOTE: do not forgot to add the following to the top of the pom.xml after it is generated | |
You have to do this manually until I figure out how to make gradle do it by itself | |
<properties> | |
<maven.compiler.source>1.8</maven.compiler.source> | |
<maven.compiler.target>1.8</maven.compiler.target> | |
</properties> | |
*/ | |
task generatePom << { | |
pom { | |
project { | |
inceptionYear = '2015' | |
} | |
}.writeTo("pom.xml") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment