Skip to content

Instantly share code, notes, and snippets.

@cbmeeks
Created May 23, 2013 13:49
Show Gist options
  • Save cbmeeks/5636200 to your computer and use it in GitHub Desktop.
Save cbmeeks/5636200 to your computer and use it in GitHub Desktop.
Demo Gradle script
version = '1.0'
apply plugin: 'jetty'
apply plugin: 'eclipse-wtp'
sourceCompatibility = 1.7
sourceSets {
selenium
}
repositories {
mavenCentral()
}
def versions = [
spring: "3.2.2.RELEASE",
springDataJpa: "1.3.1.RELEASE",
slf4j: "1.7.5",
hibernate: "4.2.0.Final"
]
dependencies {
/* JDBC Driver */
compile "mysql:mysql-connector-java:5.1.25"
/* Hibernate */
compile "org.hibernate:hibernate-core:${versions.hibernate}"
compile "org.hibernate:hibernate-validator:5.0.1.Final"
compile "org.hibernate:hibernate-entitymanager:${versions.hibernate}"
// ** Spring **
compile "org.springframework:spring-core:${versions.spring}"
compile "org.springframework:spring-context:${versions.spring}"
compile "org.springframework:spring-aop:${versions.spring}"
compile "org.springframework:spring-tx:${versions.spring}"
compile "org.springframework:spring-aspects:${versions.spring}"
compile "org.springframework:spring-jdbc:${versions.spring}"
compile "org.springframework:spring-orm:${versions.spring}"
compile "org.springframework:spring-web:${versions.spring}"
compile "org.springframework:spring-webmvc:${versions.spring}"
compile "org.springframework:spring-context-support:${versions.spring}"
compile "org.springframework:spring-test:${versions.spring}"
/* Logging */
compile "log4j:log4j:1.2.17"
compile "org.slf4j:slf4j-api:${versions.slf4j}"
/* Servlet */
providedCompile 'javax.servlet:servlet-api:2.5'
providedCompile 'javax.servlet.jsp:jsp-api:2.1'
compile 'javax.servlet:jstl:1.2'
/* Test */
testCompile 'junit:junit:4.11'
testCompile 'org.springframework:spring-test:3.2.0.RELEASE'
/* Selenium */
seleniumCompile 'mysql:mysql-connector-java:5.1.24'
seleniumCompile 'junit:junit:4.11'
seleniumCompile 'org.seleniumhq.selenium:selenium-java:2.30.0'
}
eclipse {
classpath {
plusConfigurations += configurations.seleniumCompile
}
}
task jettyDaemon(type: org.gradle.api.plugins.jetty.JettyRun) {
daemon = true
}
task selenium(type: Test, dependsOn: jettyDaemon) {
testClassesDir = sourceSets.selenium.output.classesDir
classpath = sourceSets.selenium.runtimeClasspath
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment