LOFTER for ipad —— 让兴趣,更有趣

点击下载 关闭

LOFTER-网易轻博

kotlin

593浏览    12参与
中华
中华
hdw2000
青杨
LucasHo

kotlin+spring-boot+jpa项目的gradle配置文件

group 'com.company'
version '1.0-SNAPSHOT'

buildscript {

    ext {

        kotlin_version = '1.2.0'
        spring_version = '1.5.8.RELEASE'
    }

   repositories {
  ...

group 'com.company'
version '1.0-SNAPSHOT'

buildscript {

    ext {

        kotlin_version = '1.2.0'
        spring_version = '1.5.8.RELEASE'
    }

   repositories {
        mavenCentral()
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
    }

   dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlin_version"
        classpath "org.springframework.boot:spring-boot-gradle-plugin:$spring_version"
    }
}

apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'


sourceCompatibility = 1.8

repositories {
    maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
}

dependencies {
    compile "mysql:mysql-connector-java"
    compile "org.springframework.boot:spring-boot-devtools"
    compile "org.springframework.boot:spring-boot-starter-web"
  compile "org.springframework.boot:spring-boot-starter-data-jpa"
    compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
    compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
    compile "org.springframework.session:spring-session:1.3.1.RELEASE"
    compile "org.springframework.session:spring-session-data-redis:1.3.1.RELEASE"
    compile "biz.paluch.redis:lettuce:4.4.2.Final"
    testCompile 'org.springframework.boot:spring-boot-starter-test'
}

compileKotlin {
    kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
    kotlinOptions.jvmTarget = "1.8"
}

jar {
        baseName = 'coustom-project-name'
    version =  '0.1.0'
}


sourceSets {
    main {
        java {
            srcDirs = ['src']
        }
    }
}

//依赖编译,然后打包JAR
task taskJar(type:Jar, dependsOn: compileJava) {
    from 'build/classes'
    destinationDir = file('build/libs')
}

beca se

今天开始每天翻译一小时kotlin文档。

今天开始每天翻译一小时kotlin文档。


LOFTER

让兴趣,更有趣

简单随性的记录
丰富多彩的内容
让生活更加充实

下载移动端
关注最新消息