Created
May 26, 2017 18:57
-
-
Save burhanloey/d941ca55234f645b58790ac6fb347bc5 to your computer and use it in GitHub Desktop.
Gradle config to run servlet-web-applications from kotlin-examples using Embedded Tomcat
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
// Usage: | |
// | |
// Run './gradlew tomcatRunWar' | |
// Visit http://localhost:8080/servlet-web-applications/hello | |
buildscript { | |
ext.kotlin_version = '1.1.2' | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | |
classpath "com.bmuschko:gradle-tomcat-plugin:2.2.5" | |
} | |
} | |
apply plugin: 'kotlin' | |
// apply plugin: 'war' | |
apply plugin: 'com.bmuschko.tomcat' | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
def tomcatVersion = '8.0.42' | |
tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}", | |
"org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}", | |
"org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}" | |
compile group: 'javax', name: 'javaee-api', version: '7.0' | |
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" | |
} | |
sourceSets { | |
main { | |
kotlin { | |
srcDir "src/main/kotlin" | |
} | |
} | |
test { | |
kotlin { | |
srcDir "test/main/kotlin" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment