corda/tools/error-tool/build.gradle

31 lines
739 B
Groovy
Raw Normal View History

Upgrade to gradle 7.6, kotlin 1.8 and jdk 17 Major changes due to JDK 17: 1. JDK17 JCE Provider now has built-in support for eddsas, corda uses the bouncycastle (i2p) implementation. This PR removes the conflicting algorithms from the built-in JCE provider. 2. JavaScript scripting has been removed from the JDK, the corda log4j config was using scripting to conditionally output additional diagnostic info if the MDC was populated. This PR has removed the scripting. 3. The artifactory plug-ins used are now deprecated, this PR has removed them and uses the same code as Corda 5 for publishing to artifactory. 4. Javadoc generation has been modified to use the latest dokka plug-ins. 5. Gradle 7.6 has implemented an incredibly annoying change where transitive dependencies are not put on the compile classpath, so that they have to be explicitly added as dependencies to projects. 6. Mockito has been updated, which sadly meant that quite a few source files have to changes to use the new (org.mockito.kotlin) package name. This makes this PR appear much larger than it is. 7. A number of tests have been marked as ignored to get a green, broadly they fall into 3 classes. The first is related to crypto keypair tests, it appears some logic in the JDK prefers to use the SunJCE implementation and we prefer to use bouncycastle. I believe this issue can be fixed with better test setup. The second group is related to our use of a method called "uncheckedCast(..)", the purpose of this method was to get rid of the annoying unchecked cast compiler warning that would otherwise exist. It looks like the Kotlin 1.9 compiler type inference differs and at runtime sometimes the type it infers is "Void" which causes an exception at runtime. The simplest solution is to use an explicit cast instead of unchecked cast, Corda 5 have removed unchecked cast from their codebase. The third class are a number of ActiveMQ tests which appear to have a memory leak somewhere.
2023-03-08 12:19:05 +00:00
apply plugin: 'org.jetbrains.kotlin.jvm'
apply plugin: 'com.github.johnrengelman.shadow'
dependencies {
implementation project(":common-logging")
implementation project(":tools:cliutils")
implementation "info.picocli:picocli:$picocli_version"
implementation "org.apache.logging.log4j:log4j-slf4j-impl:$log4j_version"
[EG-440] Add some error codes and the error resource generation tool (#6192) * [EG-438] First commit of error code interface * [EG-438] Implement error reporter and a few error codes * [EG-438] Add unit tests and default properties files * [EG-438] Add the error table builder * [EG-438] Update initial properties files * [EG-438] Add some Irish tests and the build.gradle * [EG-438] Fall back for aliases and use different resource strategy * [EG-438] Define the URL using a project-specific context * [EG-438] Tidy up initialization code * [EG-438] Add testing to generator and tidy up * [EG-438] Remove direct dependency on core and add own logging config * [EG-438] Fix compiler warnings and tidy up logging * [EG-438] Fix detekt warnings * [EG-438] Improve error messages * [EG-438] Address first set of review comments * [EG-438] Use enums and a builder for the reporter * [EG-438] Address first set of review comments * [EG-438] Use enums and a builder for the reporter * [EG-438] Add kdocs for error resource static methods * [EG-440] Add error code for duplicate CorDapp loading * [EG-438] Handle enums defined with underscores * [EG-440] Add errors for some CorDapp loading scenarios * [EG-440] Finish adding errors for CorDapp loading * [EG-440] Fix up errors in properties files * [EG-440] Start change to error code definition * [EG-440] Update error code definition and add resource generation tool * [EG-440] Tidy up error resource generation tool frontend * [EG-440] Small refactorings and add kdocs * [EG-440] Generate all missing resources * [EG-440] Some refactoring and start writing a test * [EG-440] Update unit test for resource generator * [EG-440] Renaming of various parts of the error tool * [EG-440] Add testing for errors and fix an issue in resource generation * [EG-440] Add a kdoc for context provider API * [EG-440] Remove old code from repository * [EG-440] Address some review comments
2020-04-29 10:21:50 +00:00
testImplementation "junit:junit:$junit_version"
testImplementation "org.assertj:assertj-core:$assertj_version"
}
jar {
enabled = false
archiveClassifier = 'ignore'
}
shadowJar {
archiveBaseName = "corda-tools-error-utils"
manifest {
attributes(
[EG-440] Add some error codes and the error resource generation tool (#6192) * [EG-438] First commit of error code interface * [EG-438] Implement error reporter and a few error codes * [EG-438] Add unit tests and default properties files * [EG-438] Add the error table builder * [EG-438] Update initial properties files * [EG-438] Add some Irish tests and the build.gradle * [EG-438] Fall back for aliases and use different resource strategy * [EG-438] Define the URL using a project-specific context * [EG-438] Tidy up initialization code * [EG-438] Add testing to generator and tidy up * [EG-438] Remove direct dependency on core and add own logging config * [EG-438] Fix compiler warnings and tidy up logging * [EG-438] Fix detekt warnings * [EG-438] Improve error messages * [EG-438] Address first set of review comments * [EG-438] Use enums and a builder for the reporter * [EG-438] Address first set of review comments * [EG-438] Use enums and a builder for the reporter * [EG-438] Add kdocs for error resource static methods * [EG-440] Add error code for duplicate CorDapp loading * [EG-438] Handle enums defined with underscores * [EG-440] Add errors for some CorDapp loading scenarios * [EG-440] Finish adding errors for CorDapp loading * [EG-440] Fix up errors in properties files * [EG-440] Start change to error code definition * [EG-440] Update error code definition and add resource generation tool * [EG-440] Tidy up error resource generation tool frontend * [EG-440] Small refactorings and add kdocs * [EG-440] Generate all missing resources * [EG-440] Some refactoring and start writing a test * [EG-440] Update unit test for resource generator * [EG-440] Renaming of various parts of the error tool * [EG-440] Add testing for errors and fix an issue in resource generation * [EG-440] Add a kdoc for context provider API * [EG-440] Remove old code from repository * [EG-440] Address some review comments
2020-04-29 10:21:50 +00:00
'Main-Class': "net.corda.errorUtilities.ErrorToolKt"
)
}
[EG-440] Add some error codes and the error resource generation tool (#6192) * [EG-438] First commit of error code interface * [EG-438] Implement error reporter and a few error codes * [EG-438] Add unit tests and default properties files * [EG-438] Add the error table builder * [EG-438] Update initial properties files * [EG-438] Add some Irish tests and the build.gradle * [EG-438] Fall back for aliases and use different resource strategy * [EG-438] Define the URL using a project-specific context * [EG-438] Tidy up initialization code * [EG-438] Add testing to generator and tidy up * [EG-438] Remove direct dependency on core and add own logging config * [EG-438] Fix compiler warnings and tidy up logging * [EG-438] Fix detekt warnings * [EG-438] Improve error messages * [EG-438] Address first set of review comments * [EG-438] Use enums and a builder for the reporter * [EG-438] Address first set of review comments * [EG-438] Use enums and a builder for the reporter * [EG-438] Add kdocs for error resource static methods * [EG-440] Add error code for duplicate CorDapp loading * [EG-438] Handle enums defined with underscores * [EG-440] Add errors for some CorDapp loading scenarios * [EG-440] Finish adding errors for CorDapp loading * [EG-440] Fix up errors in properties files * [EG-440] Start change to error code definition * [EG-440] Update error code definition and add resource generation tool * [EG-440] Tidy up error resource generation tool frontend * [EG-440] Small refactorings and add kdocs * [EG-440] Generate all missing resources * [EG-440] Some refactoring and start writing a test * [EG-440] Update unit test for resource generator * [EG-440] Renaming of various parts of the error tool * [EG-440] Add testing for errors and fix an issue in resource generation * [EG-440] Add a kdoc for context provider API * [EG-440] Remove old code from repository * [EG-440] Address some review comments
2020-04-29 10:21:50 +00:00
}
artifacts {
archives shadowJar
}