|
| 1 | +plugins { |
| 2 | + id "java" |
| 3 | + id "com.github.johnrengelman.shadow" version "5.0.0" |
| 4 | + id "application" |
| 5 | + id "net.ltgt.apt-eclipse" version "0.21" |
| 6 | + id "org.springframework.boot" version "2.1.8.RELEASE" |
| 7 | + id "io.spring.dependency-management" version "1.0.6.RELEASE" |
| 8 | +} |
| 9 | + |
| 10 | +version "0.1" |
| 11 | +group "graal.spring.demo" |
| 12 | + |
| 13 | +repositories { |
| 14 | + mavenCentral() |
| 15 | + maven { url "https://jcenter.bintray.com" } |
| 16 | +} |
| 17 | + |
| 18 | +configurations { |
| 19 | + // for dependencies that are needed for development only |
| 20 | + developmentOnly |
| 21 | +} |
| 22 | + |
| 23 | +dependencies { |
| 24 | + annotationProcessor platform("io.micronaut:micronaut-bom:$micronautVersion") |
| 25 | + annotationProcessor "io.micronaut:micronaut-graal" |
| 26 | + annotationProcessor "io.micronaut:micronaut-inject-java" |
| 27 | + annotationProcessor "io.micronaut:micronaut-validation" |
| 28 | + annotationProcessor "io.micronaut.spring:micronaut-spring-boot" |
| 29 | + annotationProcessor "io.micronaut.spring:micronaut-spring-boot-annotation" |
| 30 | + annotationProcessor "io.micronaut.spring:micronaut-spring-web-annotation" |
| 31 | + testAnnotationProcessor "io.micronaut.spring:micronaut-spring-web-annotation" |
| 32 | + |
| 33 | + compileOnly "com.oracle.substratevm:svm" |
| 34 | + implementation platform("io.micronaut:micronaut-bom:$micronautVersion") |
| 35 | + implementation "io.micronaut:micronaut-http-client" |
| 36 | + implementation "io.micronaut:micronaut-inject" |
| 37 | + implementation "io.micronaut:micronaut-validation" |
| 38 | + implementation "io.micronaut:micronaut-runtime" |
| 39 | + implementation("io.micronaut.aws:micronaut-function-aws-custom-runtime:1.3.2") { |
| 40 | + exclude group: "com.fasterxml.jackson.module", module: "jackson-module-afterburner" |
| 41 | + } |
| 42 | + implementation("io.micronaut.aws:micronaut-function-aws-api-proxy:1.3.2") { |
| 43 | + exclude group: "com.fasterxml.jackson.module", module: "jackson-module-afterburner" |
| 44 | + } |
| 45 | + developmentOnly "io.micronaut:micronaut-http-server-netty" |
| 46 | + runtimeOnly "ch.qos.logback:logback-classic:1.2.3" |
| 47 | + testAnnotationProcessor platform("io.micronaut:micronaut-bom:$micronautVersion") |
| 48 | + testAnnotationProcessor "io.micronaut:micronaut-inject-java" |
| 49 | + testImplementation platform("io.micronaut:micronaut-bom:$micronautVersion") |
| 50 | + testImplementation "org.junit.jupiter:junit-jupiter-api" |
| 51 | + testImplementation "io.micronaut.test:micronaut-test-junit5" |
| 52 | + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine" |
| 53 | + |
| 54 | + // spring support |
| 55 | + compile("org.springframework.boot:spring-boot-starter-web") |
| 56 | + runtime("io.micronaut.spring:micronaut-spring-boot:1.0.1") |
| 57 | + runtime("io.micronaut.spring:micronaut-spring-web:1.0.1") |
| 58 | +} |
| 59 | + |
| 60 | +test.classpath += configurations.developmentOnly |
| 61 | + |
| 62 | +mainClassName = "graal.spring.demo.Application" |
| 63 | +// use JUnit 5 platform |
| 64 | +test { |
| 65 | + useJUnitPlatform() |
| 66 | +} |
| 67 | + |
| 68 | +shadowJar { |
| 69 | + mergeServiceFiles() |
| 70 | +} |
| 71 | + |
| 72 | +run.classpath += configurations.developmentOnly |
| 73 | +run.jvmArgs('-noverify', '-XX:TieredStopAtLevel=1', '-Dcom.sun.management.jmxremote') |
| 74 | +tasks.withType(JavaCompile){ |
| 75 | + options.encoding = "UTF-8" |
| 76 | + options.compilerArgs.add('-parameters') |
| 77 | +} |
0 commit comments