首页
开源
资讯
活动
开源许可证
软件工程云服务
软件代码质量检测云服务
持续集成与部署云服务
社区个性化内容推荐服务
贡献审阅人推荐服务
群体化学习服务
重睛鸟代码扫描工具
登录
注册
代码拉取完成,页面将自动刷新
Watch
4
Star
1
Fork
4
Luyu Community
/
Router
Fork 仓库
加载中
取消
确认
代码
Issues
2
Pull Requests
1
Wiki
0
统计
更新失败,请稍后重试!
Issues
/
详情
移除标识
内容风险标识
本任务被
标识为内容中包含有代码安全 Bug 、隐私泄露等敏感信息,仓库外成员不可访问
Gradle 8.4下直接运行gradle assemble会报错
待办的
#I8EMUP
JasonCeng
创建于
2023-11-07 20:18
提供调整后,适用于Gradle 8.x的gradle文件如下,可直接替换build.gradle运行 ``` plugins { id 'com.github.sherter.google-java-format' version '0.8' id 'org.ajoberstar.grgit' version '4.0.1' } // Apply the java-library plugin to add support for Java Library //apply plugin: 'maven' apply plugin: 'maven-publish' apply plugin: 'signing' apply plugin: 'idea' apply plugin: 'eclipse' apply plugin: 'java' //apply plugin: 'war' apply plugin: 'jacoco' // In this section you declare where to find the dependencies of your project repositories { // Use jcenter for resolving your dependencies. // You can declare any Maven/Ivy/file repository here. jcenter() maven { allowInsecureProtocol = true url "https://oss.sonatype.org/content/repositories/snapshots" } maven { allowInsecureProtocol = true url "https://s01.oss.sonatype.org/content/repositories/snapshots/" } maven { allowInsecureProtocol = true url 'http://maven.aliyun.com/nexus/content/groups/public/' } maven { allowInsecureProtocol = true url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' } } group 'link.luyu' version '1.0.1' configurations.all { exclude module: "spring-boot-starter-logging" exclude module: "spring-boot-starter-web" exclude group: 'io.netty', module: 'netty-all' } def log4j_version="2.17.1" List logger = [ "org.apache.logging.log4j:log4j-api:$log4j_version", //"org.apache.logging.log4j:log4j-core:$log4j_version", "org.apache.logging.log4j:log4j-slf4j-impl:$log4j_version", //"org.apache.logging.log4j:log4j-to-slf4j:$log4j_version", //"org.apache.logging.log4j:log4j-web:$log4j_version", //"org.apache.logging.log4j:log4j-jul:$log4j_version" ] dependencies { implementation logger implementation 'org.quartz-scheduler:quartz:2.3.2' implementation 'com.moandjiezana.toml:toml4j:0.7.2' implementation 'org.apache.commons:commons-lang3:3.11' implementation 'com.fasterxml.jackson.core:jackson-databind:2.11.2' // must not lower than 2.11.0 to support abi translate implementation 'org.springframework.boot:spring-boot-starter-log4j2:2.6.1' implementation 'org.springframework.boot:spring-boot-starter-actuator:2.4.9' implementation 'org.springframework.boot:spring-boot-configuration-processor:2.4.9' implementation 'org.asynchttpclient:async-http-client:2.12.2' implementation 'org.bouncycastle:bcprov-jdk15on:1.60' implementation 'commons-codec:commons-codec:1.14' implementation 'javax.activation:activation:1.1.1' implementation group: 'io.netty', name: 'netty-buffer', version: '4.1.58.Final' implementation group: 'io.netty', name: 'netty-codec', version: '4.1.58.Final' implementation group: 'io.netty', name: 'netty-codec-http', version: '4.1.58.Final' implementation group: 'io.netty', name: 'netty-codec-http2', version: '4.1.58.Final' implementation group: 'io.netty', name: 'netty-common', version: '4.1.58.Final' implementation group: 'io.netty', name: 'netty-handler', version: '4.1.58.Final' implementation group: 'io.netty', name: 'netty-resolver', version: '4.1.58.Final' implementation group: 'io.netty', name: 'netty-transport', version: '4.1.58.Final' implementation 'link.luyu:luyu-cross-chain-protocol:1.0.0' implementation 'link.luyu:luyu-toolkit:1.0.0' // Use JUnit test framework testImplementation 'junit:junit:4.12' testImplementation 'org.springframework.boot:spring-boot-starter-test:2.1.13.RELEASE' testImplementation fileTree(dir: 'plugin', include: '*.jar' ) implementation 'org.fisco-bcos:tcnative:2.0.34.0' } sourceSets { main { resources { exclude '/*' } } } jar { destinationDirectory = file('dist/apps') archiveFileName = project.name + "-" + project.version + '.jar' exclude '**/*.xml' exclude '**/*.toml' exclude '**/*.properties' exclude '**/*.yml' exclude '**/*.crt' exclude '**/*.key' exclude '**/*.sql' exclude '**/*.pem' exclude '**/mime.types' manifest { try { def repo = grgit.open(dir: file('.').canonicalPath) if (repo != null) { def date = new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") def branch = repo.branch.getCurrent().getName() def commit = repo.head().getAbbreviatedId(40) attributes(["Implementation-Timestamp": date, "Git-Branch" : branch, "Git-Commit" : commit ]) logger.info(" Commit : ") logger.info(" => date: {}", date) logger.info(" => branch: {}", branch) logger.info(" => commit: {}", commit) } } catch (Exception e) { // logger.warn(' .git not exist, cannot found commit info') } } doLast { copy { from file('src/main/resources/') into 'dist/conf' } copy { from configurations.runtimeClasspath into 'dist/lib' } copy { from file('.').listFiles().findAll { File f -> (f.name.endsWith('.sh') || f.name.endsWith('.env')) } into 'dist' } copy { from file('scripts/') into 'dist' } mkdir 'dist/plugin' } } googleJavaFormat { options style: 'AOSP' source = sourceSets*.allJava include '**/*.java' exclude '**/temp/*.java' } verifyGoogleJavaFormat { source = sourceSets*.allJava include '**/*.java' exclude '**/temp/*.java' } test { testLogging { showStandardStreams = false events "passed","skipped","failed" } } jacocoTestReport { reports { xml.required = true html.required = true } } ```
提供调整后,适用于Gradle 8.x的gradle文件如下,可直接替换build.gradle运行 ``` plugins { id 'com.github.sherter.google-java-format' version '0.8' id 'org.ajoberstar.grgit' version '4.0.1' } // Apply the java-library plugin to add support for Java Library //apply plugin: 'maven' apply plugin: 'maven-publish' apply plugin: 'signing' apply plugin: 'idea' apply plugin: 'eclipse' apply plugin: 'java' //apply plugin: 'war' apply plugin: 'jacoco' // In this section you declare where to find the dependencies of your project repositories { // Use jcenter for resolving your dependencies. // You can declare any Maven/Ivy/file repository here. jcenter() maven { allowInsecureProtocol = true url "https://oss.sonatype.org/content/repositories/snapshots" } maven { allowInsecureProtocol = true url "https://s01.oss.sonatype.org/content/repositories/snapshots/" } maven { allowInsecureProtocol = true url 'http://maven.aliyun.com/nexus/content/groups/public/' } maven { allowInsecureProtocol = true url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' } } group 'link.luyu' version '1.0.1' configurations.all { exclude module: "spring-boot-starter-logging" exclude module: "spring-boot-starter-web" exclude group: 'io.netty', module: 'netty-all' } def log4j_version="2.17.1" List logger = [ "org.apache.logging.log4j:log4j-api:$log4j_version", //"org.apache.logging.log4j:log4j-core:$log4j_version", "org.apache.logging.log4j:log4j-slf4j-impl:$log4j_version", //"org.apache.logging.log4j:log4j-to-slf4j:$log4j_version", //"org.apache.logging.log4j:log4j-web:$log4j_version", //"org.apache.logging.log4j:log4j-jul:$log4j_version" ] dependencies { implementation logger implementation 'org.quartz-scheduler:quartz:2.3.2' implementation 'com.moandjiezana.toml:toml4j:0.7.2' implementation 'org.apache.commons:commons-lang3:3.11' implementation 'com.fasterxml.jackson.core:jackson-databind:2.11.2' // must not lower than 2.11.0 to support abi translate implementation 'org.springframework.boot:spring-boot-starter-log4j2:2.6.1' implementation 'org.springframework.boot:spring-boot-starter-actuator:2.4.9' implementation 'org.springframework.boot:spring-boot-configuration-processor:2.4.9' implementation 'org.asynchttpclient:async-http-client:2.12.2' implementation 'org.bouncycastle:bcprov-jdk15on:1.60' implementation 'commons-codec:commons-codec:1.14' implementation 'javax.activation:activation:1.1.1' implementation group: 'io.netty', name: 'netty-buffer', version: '4.1.58.Final' implementation group: 'io.netty', name: 'netty-codec', version: '4.1.58.Final' implementation group: 'io.netty', name: 'netty-codec-http', version: '4.1.58.Final' implementation group: 'io.netty', name: 'netty-codec-http2', version: '4.1.58.Final' implementation group: 'io.netty', name: 'netty-common', version: '4.1.58.Final' implementation group: 'io.netty', name: 'netty-handler', version: '4.1.58.Final' implementation group: 'io.netty', name: 'netty-resolver', version: '4.1.58.Final' implementation group: 'io.netty', name: 'netty-transport', version: '4.1.58.Final' implementation 'link.luyu:luyu-cross-chain-protocol:1.0.0' implementation 'link.luyu:luyu-toolkit:1.0.0' // Use JUnit test framework testImplementation 'junit:junit:4.12' testImplementation 'org.springframework.boot:spring-boot-starter-test:2.1.13.RELEASE' testImplementation fileTree(dir: 'plugin', include: '*.jar' ) implementation 'org.fisco-bcos:tcnative:2.0.34.0' } sourceSets { main { resources { exclude '/*' } } } jar { destinationDirectory = file('dist/apps') archiveFileName = project.name + "-" + project.version + '.jar' exclude '**/*.xml' exclude '**/*.toml' exclude '**/*.properties' exclude '**/*.yml' exclude '**/*.crt' exclude '**/*.key' exclude '**/*.sql' exclude '**/*.pem' exclude '**/mime.types' manifest { try { def repo = grgit.open(dir: file('.').canonicalPath) if (repo != null) { def date = new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") def branch = repo.branch.getCurrent().getName() def commit = repo.head().getAbbreviatedId(40) attributes(["Implementation-Timestamp": date, "Git-Branch" : branch, "Git-Commit" : commit ]) logger.info(" Commit : ") logger.info(" => date: {}", date) logger.info(" => branch: {}", branch) logger.info(" => commit: {}", commit) } } catch (Exception e) { // logger.warn(' .git not exist, cannot found commit info') } } doLast { copy { from file('src/main/resources/') into 'dist/conf' } copy { from configurations.runtimeClasspath into 'dist/lib' } copy { from file('.').listFiles().findAll { File f -> (f.name.endsWith('.sh') || f.name.endsWith('.env')) } into 'dist' } copy { from file('scripts/') into 'dist' } mkdir 'dist/plugin' } } googleJavaFormat { options style: 'AOSP' source = sourceSets*.allJava include '**/*.java' exclude '**/temp/*.java' } verifyGoogleJavaFormat { source = sourceSets*.allJava include '**/*.java' exclude '**/temp/*.java' } test { testLogging { showStandardStreams = false events "passed","skipped","failed" } } jacocoTestReport { reports { xml.required = true html.required = true } } ```
评论 (
0
)
JasonCeng
创建了
任务
JasonCeng
修改了
描述
原值
提供调整后,适用于Gradle 8.x的gradle文件如下
:
```
plugins {
id 'com.github.sherter.google-java-format' version '0.8'
id 'org.ajoberstar.grgit' version '4.0.1'
}
// Apply the java-library plugin to add support for Java Library
//apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'java'
//apply plugin: 'war'
apply plugin: 'jacoco'
// In this section you declare where to find the dependencies of your project
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
maven {
allowInsecureProtocol = true
url "https://oss.sonatype.org/content/repositories/snapshots"
}
maven {
allowInsecureProtocol = true
url "https://s01.oss.sonatype.org/content/repositories/snapshots/"
}
maven {
allowInsecureProtocol = true
url 'http://maven.aliyun.com/nexus/content/groups/public/'
}
maven {
allowInsecureProtocol = true
url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'
}
}
group 'link.luyu'
version '1.0.1'
configurations.all {
exclude module: "spring-boot-starter-logging"
exclude module: "spring-boot-starter-web"
exclude group: 'io.netty', module: 'netty-all'
}
def log4j_version="2.17.1"
List logger = [
"org.apache.logging.log4j:log4j-api:$log4j_version",
//"org.apache.logging.log4j:log4j-core:$log4j_version",
"org.apache.logging.log4j:log4j-slf4j-impl:$log4j_version",
//"org.apache.logging.log4j:log4j-to-slf4j:$log4j_version",
//"org.apache.logging.log4j:log4j-web:$log4j_version",
//"org.apache.logging.log4j:log4j-jul:$log4j_version"
]
dependencies {
implementation logger
implementation 'org.quartz-scheduler:quartz:2.3.2'
implementation 'com.moandjiezana.toml:toml4j:0.7.2'
implementation 'org.apache.commons:commons-lang3:3.11'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.11.2' // must not lower than 2.11.0 to support abi translate
implementation 'org.springframework.boot:spring-boot-starter-log4j2:2.6.1'
implementation 'org.springframework.boot:spring-boot-starter-actuator:2.4.9'
implementation 'org.springframework.boot:spring-boot-configuration-processor:2.4.9'
implementation 'org.asynchttpclient:async-http-client:2.12.2'
implementation 'org.bouncycastle:bcprov-jdk15on:1.60'
implementation 'commons-codec:commons-codec:1.14'
implementation 'javax.activation:activation:1.1.1'
implementation group: 'io.netty', name: 'netty-buffer', version: '4.1.58.Final'
implementation group: 'io.netty', name: 'netty-codec', version: '4.1.58.Final'
implementation group: 'io.netty', name: 'netty-codec-http', version: '4.1.58.Final'
implementation group: 'io.netty', name: 'netty-codec-http2', version: '4.1.58.Final'
implementation group: 'io.netty', name: 'netty-common', version: '4.1.58.Final'
implementation group: 'io.netty', name: 'netty-handler', version: '4.1.58.Final'
implementation group: 'io.netty', name: 'netty-resolver', version: '4.1.58.Final'
implementation group: 'io.netty', name: 'netty-transport', version: '4.1.58.Final'
implementation 'link.luyu:luyu-cross-chain-protocol:1.0.0'
implementation 'link.luyu:luyu-toolkit:1.0.0'
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
testImplementation 'org.springframework.boot:spring-boot-starter-test:2.1.13.RELEASE'
testImplementation fileTree(dir: 'plugin', include: '*.jar' )
implementation 'org.fisco-bcos:tcnative:2.0.34.0'
}
sourceSets {
main {
resources {
exclude '/*'
}
}
}
jar {
destinationDirectory = file('dist/apps')
archiveFileName = project.name + "-" + project.version + '.jar'
exclude '**/*.xml'
exclude '**/*.toml'
exclude '**/*.properties'
exclude '**/*.yml'
exclude '**/*.crt'
exclude '**/*.key'
exclude '**/*.sql'
exclude '**/*.pem'
exclude '**/mime.types'
manifest {
try {
def repo = grgit.open(dir: file('.').canonicalPath)
if (repo != null) {
def date = new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
def branch = repo.branch.getCurrent().getName()
def commit = repo.head().getAbbreviatedId(40)
attributes(["Implementation-Timestamp": date,
"Git-Branch" : branch,
"Git-Commit" : commit
])
logger.info(" Commit : ")
logger.info(" => date: {}", date)
logger.info(" => branch: {}", branch)
logger.info(" => commit: {}", commit)
}
} catch (Exception e) {
// logger.warn(' .git not exist, cannot found commit info')
}
}
doLast {
copy {
from file('src/main/resources/')
into 'dist/conf'
}
copy {
from configurations.runtimeClasspath
into 'dist/lib'
}
copy {
from file('.').listFiles().findAll { File f -> (f.name.endsWith('.sh') || f.name.endsWith('.env')) }
into 'dist'
}
copy {
from file('scripts/')
into 'dist'
}
mkdir 'dist/plugin'
}
}
googleJavaFormat {
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
exclude '**/temp/*.java'
}
verifyGoogleJavaFormat {
source = sourceSets*.allJava
include '**/*.java'
exclude '**/temp/*.java'
}
test {
testLogging {
showStandardStreams = false
events "passed","skipped","failed"
}
}
jacocoTestReport {
reports {
xml.required = true
html.required = true
}
}
```
新值
提供调整后,适用于Gradle 8.x的gradle文件如下
,可直接替换build.gradle运行
```
plugins {
id 'com.github.sherter.google-java-format' version '0.8'
id 'org.ajoberstar.grgit' version '4.0.1'
}
// Apply the java-library plugin to add support for Java Library
//apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'java'
//apply plugin: 'war'
apply plugin: 'jacoco'
// In this section you declare where to find the dependencies of your project
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
maven {
allowInsecureProtocol = true
url "https://oss.sonatype.org/content/repositories/snapshots"
}
maven {
allowInsecureProtocol = true
url "https://s01.oss.sonatype.org/content/repositories/snapshots/"
}
maven {
allowInsecureProtocol = true
url 'http://maven.aliyun.com/nexus/content/groups/public/'
}
maven {
allowInsecureProtocol = true
url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'
}
}
group 'link.luyu'
version '1.0.1'
configurations.all {
exclude module: "spring-boot-starter-logging"
exclude module: "spring-boot-starter-web"
exclude group: 'io.netty', module: 'netty-all'
}
def log4j_version="2.17.1"
List logger = [
"org.apache.logging.log4j:log4j-api:$log4j_version",
//"org.apache.logging.log4j:log4j-core:$log4j_version",
"org.apache.logging.log4j:log4j-slf4j-impl:$log4j_version",
//"org.apache.logging.log4j:log4j-to-slf4j:$log4j_version",
//"org.apache.logging.log4j:log4j-web:$log4j_version",
//"org.apache.logging.log4j:log4j-jul:$log4j_version"
]
dependencies {
implementation logger
implementation 'org.quartz-scheduler:quartz:2.3.2'
implementation 'com.moandjiezana.toml:toml4j:0.7.2'
implementation 'org.apache.commons:commons-lang3:3.11'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.11.2' // must not lower than 2.11.0 to support abi translate
implementation 'org.springframework.boot:spring-boot-starter-log4j2:2.6.1'
implementation 'org.springframework.boot:spring-boot-starter-actuator:2.4.9'
implementation 'org.springframework.boot:spring-boot-configuration-processor:2.4.9'
implementation 'org.asynchttpclient:async-http-client:2.12.2'
implementation 'org.bouncycastle:bcprov-jdk15on:1.60'
implementation 'commons-codec:commons-codec:1.14'
implementation 'javax.activation:activation:1.1.1'
implementation group: 'io.netty', name: 'netty-buffer', version: '4.1.58.Final'
implementation group: 'io.netty', name: 'netty-codec', version: '4.1.58.Final'
implementation group: 'io.netty', name: 'netty-codec-http', version: '4.1.58.Final'
implementation group: 'io.netty', name: 'netty-codec-http2', version: '4.1.58.Final'
implementation group: 'io.netty', name: 'netty-common', version: '4.1.58.Final'
implementation group: 'io.netty', name: 'netty-handler', version: '4.1.58.Final'
implementation group: 'io.netty', name: 'netty-resolver', version: '4.1.58.Final'
implementation group: 'io.netty', name: 'netty-transport', version: '4.1.58.Final'
implementation 'link.luyu:luyu-cross-chain-protocol:1.0.0'
implementation 'link.luyu:luyu-toolkit:1.0.0'
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
testImplementation 'org.springframework.boot:spring-boot-starter-test:2.1.13.RELEASE'
testImplementation fileTree(dir: 'plugin', include: '*.jar' )
implementation 'org.fisco-bcos:tcnative:2.0.34.0'
}
sourceSets {
main {
resources {
exclude '/*'
}
}
}
jar {
destinationDirectory = file('dist/apps')
archiveFileName = project.name + "-" + project.version + '.jar'
exclude '**/*.xml'
exclude '**/*.toml'
exclude '**/*.properties'
exclude '**/*.yml'
exclude '**/*.crt'
exclude '**/*.key'
exclude '**/*.sql'
exclude '**/*.pem'
exclude '**/mime.types'
manifest {
try {
def repo = grgit.open(dir: file('.').canonicalPath)
if (repo != null) {
def date = new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
def branch = repo.branch.getCurrent().getName()
def commit = repo.head().getAbbreviatedId(40)
attributes(["Implementation-Timestamp": date,
"Git-Branch" : branch,
"Git-Commit" : commit
])
logger.info(" Commit : ")
logger.info(" => date: {}", date)
logger.info(" => branch: {}", branch)
logger.info(" => commit: {}", commit)
}
} catch (Exception e) {
// logger.warn(' .git not exist, cannot found commit info')
}
}
doLast {
copy {
from file('src/main/resources/')
into 'dist/conf'
}
copy {
from configurations.runtimeClasspath
into 'dist/lib'
}
copy {
from file('.').listFiles().findAll { File f -> (f.name.endsWith('.sh') || f.name.endsWith('.env')) }
into 'dist'
}
copy {
from file('scripts/')
into 'dist'
}
mkdir 'dist/plugin'
}
}
googleJavaFormat {
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
exclude '**/temp/*.java'
}
verifyGoogleJavaFormat {
source = sourceSets*.allJava
include '**/*.java'
exclude '**/temp/*.java'
}
test {
testLogging {
showStandardStreams = false
events "passed","skipped","failed"
}
}
jacocoTestReport {
reports {
xml.required = true
html.required = true
}
}
```
展开全部操作日志
折叠全部操作日志
登录
后才可以发表评论
状态
待办的
待办的
进行中
已完成
已关闭
负责人
未设置
标签
未设置
标签管理
里程碑
未关联里程碑
未关联里程碑
Pull Requests
未关联
未关联
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
未关联
分支 (5)
标签 (2)
master
feature-cert-san
develop
develop-account-manager
sm2_with_sm3
v1.0.1
v1.0.0
开始日期   -   截止日期
-
置顶选项
不置顶
置顶等级:高
置顶等级:中
置顶等级:低
优先级
不指定
严重
主要
次要
不重要
参与者(1)