You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
2.7 KiB

  1. /*
  2. * This build file was generated by the Gradle 'init' task.
  3. *
  4. * This generated file contains a commented-out sample Java project to get you started.
  5. * For more details take a look at the Java Quickstart chapter in the Gradle
  6. * user guide available at https://docs.gradle.org/4.3.1/userguide/tutorial_java_projects.html
  7. */
  8. group = 'cn.afterturn'
  9. version = '0.1-beta'
  10. // Apply the java plugin to add support for Java
  11. apply plugin: 'java'
  12. apply plugin: 'idea'
  13. apply plugin: "io.spring.dependency-management"
  14. buildscript {
  15. ext {
  16. springBootVersion ='1.5.8.RELEASE'
  17. }
  18. repositories {
  19. maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
  20. mavenLocal()//maven的本地仓
  21. jcenter()//官方仓
  22. }
  23. dependencies {
  24. classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
  25. classpath("io.spring.gradle:dependency-management-plugin:1.0.3.RELEASE")
  26. }
  27. }
  28. // In this section you declare where to find the dependencies of your project
  29. repositories {
  30. // Use 'jcenter' for resolving your dependencies.
  31. // You can declare any Maven/Ivy/file repository here.
  32. maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
  33. jcenter()
  34. }
  35. sourceCompatibility = 1.8
  36. targetCompatibility = 1.8
  37. [compileJava, javadoc, compileTestJava]*.options*.encoding = 'UTF-8'
  38. task sourcesJar(type: Jar, dependsOn: classes) {
  39. classifier = 'sources'
  40. from sourceSets.main.allSource
  41. }
  42. artifacts {
  43. archives sourcesJar
  44. }
  45. ext {
  46. springBootVersion ='1.5.8.RELEASE'
  47. springVersion = '4.3.12.RELEASE'
  48. }
  49. // In this section you declare the dependencies for your production and test code
  50. dependencies {
  51. // The production code uses the SLF4J logging API at compile time
  52. compile 'org.slf4j:slf4j-api:1.7.25'
  53. // compile group: 'io.spring.gradle', name: 'dependency-management-plugin', version: '1.0.3.RELEASE'
  54. compile group: 'org.springframework.boot', name: 'spring-boot-autoconfigure', version: "$springBootVersion"
  55. compile group: 'org.springframework.boot', name: 'spring-boot-configuration-processor', version: "$springBootVersion"
  56. compile group: 'org.springframework.boot', name: 'spring-boot-starter-web',version:"$springBootVersion"
  57. // Declare the dependency for your favourite test framework you want to use in your tests.
  58. // TestNG is also supported by the Gradle Test task. Just change the
  59. // testCompile dependency to testCompile 'org.testng:testng:6.8.1' and add
  60. // 'test.useTestNG()' to your build script.
  61. testCompile 'junit:junit:4.12'
  62. }