Closed khotyn closed 5 years ago
是的,最好提供一个gradle版本的构建脚本
🙏,我们近期考虑一下。
-- http://sofastack.tech 2018年12月12日 +0800 PM11:51 primary notifications@github.com,写道:
是的,最好提供一个gradle版本的构建脚本 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
@primary 我们计划从 3.1.1 开始提供 Gradle 插件,目前在 3.1.1-SNAPSHOT 中可以使用,有兴趣的话,可以试用一下,有问题随时反馈,这里是一个工程的配置样例,文档会在发布的时候提供在 http://sofastack.tech 上:
buildscript {
ext {
sofaBootVersion = '3.1.1-SNAPSHOT'
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath("com.alipay.sofa:sofa-boot-gradle-plugin:${sofaBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'com.alipay.sofa.boot'
apply plugin: 'io.spring.dependency-management'
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
implementation('com.alipay.sofa:rpc-sofa-boot-starter')
implementation('org.springframework.boot:spring-boot-starter')
testImplementation('org.springframework.boot:spring-boot-starter-test')
}
Spring Boot has a Gradle dependency management plugin to manage the dependencies, maybe SOFABoot should also provide one.
Following is the example of a Spring Boot Gradle build script: