mirror of
https://github.com/corda/corda.git
synced 2024-12-24 07:06:44 +00:00
CORDA-1704: Suppress ProGuard's "note" output (#3499)
* Reduce ProGuard output for kotlin-metadata artifact. * Configure ProGuard not to display "notes" about potential configuration issues. Keep notes for the "checkDeterminism" steps, though. * Also resolve some of the issues that we would now be ignoring.
This commit is contained in:
parent
d0568121b7
commit
7839d78338
@ -39,7 +39,6 @@ task metadata(type: ProGuardTask) {
|
|||||||
|
|
||||||
keepattributes '*'
|
keepattributes '*'
|
||||||
dontoptimize
|
dontoptimize
|
||||||
printseeds
|
|
||||||
verbose
|
verbose
|
||||||
|
|
||||||
dontwarn 'com.sun.jna.**'
|
dontwarn 'com.sun.jna.**'
|
||||||
@ -47,6 +46,7 @@ task metadata(type: ProGuardTask) {
|
|||||||
dontwarn 'org.jetbrains.kotlin.com.intellij.**'
|
dontwarn 'org.jetbrains.kotlin.com.intellij.**'
|
||||||
dontwarn 'org.jetbrains.kotlin.com.google.j2objc.annotations.**'
|
dontwarn 'org.jetbrains.kotlin.com.google.j2objc.annotations.**'
|
||||||
dontwarn 'org.jetbrains.kotlin.com.google.errorprone.annotations.**'
|
dontwarn 'org.jetbrains.kotlin.com.google.errorprone.annotations.**'
|
||||||
|
dontnote
|
||||||
|
|
||||||
keep 'class org.jetbrains.kotlin.load.java.JvmAnnotationNames { *; }'
|
keep 'class org.jetbrains.kotlin.load.java.JvmAnnotationNames { *; }'
|
||||||
keep 'class org.jetbrains.kotlin.metadata.** { *; }', includedescriptorclasses: true
|
keep 'class org.jetbrains.kotlin.metadata.** { *; }', includedescriptorclasses: true
|
||||||
@ -68,6 +68,7 @@ task validate(type: ProGuardTask) {
|
|||||||
verbose
|
verbose
|
||||||
|
|
||||||
dontwarn 'org.jetbrains.kotlin.com.google.errorprone.annotations.**'
|
dontwarn 'org.jetbrains.kotlin.com.google.errorprone.annotations.**'
|
||||||
|
dontnote
|
||||||
|
|
||||||
keep 'class *'
|
keep 'class *'
|
||||||
}
|
}
|
||||||
@ -77,5 +78,4 @@ artifacts {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defaultTasks "metadata"
|
defaultTasks "metadata"
|
||||||
assemble.dependsOn metadata
|
|
||||||
metadata.finalizedBy validate
|
metadata.finalizedBy validate
|
||||||
|
@ -78,6 +78,7 @@ task predeterminise(type: ProGuardTask) {
|
|||||||
dontpreverify
|
dontpreverify
|
||||||
dontobfuscate
|
dontobfuscate
|
||||||
dontoptimize
|
dontoptimize
|
||||||
|
dontnote
|
||||||
printseeds
|
printseeds
|
||||||
verbose
|
verbose
|
||||||
|
|
||||||
@ -121,6 +122,7 @@ task determinise(type: ProGuardTask) {
|
|||||||
keepattributes '*'
|
keepattributes '*'
|
||||||
keepdirectories
|
keepdirectories
|
||||||
dontobfuscate
|
dontobfuscate
|
||||||
|
dontnote
|
||||||
printseeds
|
printseeds
|
||||||
verbose
|
verbose
|
||||||
|
|
||||||
@ -166,7 +168,6 @@ task checkDeterminism(type: ProGuardTask, dependsOn: jdkTask) {
|
|||||||
defaultTasks "determinise"
|
defaultTasks "determinise"
|
||||||
determinise.finalizedBy metafix
|
determinise.finalizedBy metafix
|
||||||
metafix.finalizedBy checkDeterminism
|
metafix.finalizedBy checkDeterminism
|
||||||
assemble.dependsOn checkDeterminism
|
|
||||||
|
|
||||||
def deterministicJar = metafix.outputs.files.singleFile
|
def deterministicJar = metafix.outputs.files.singleFile
|
||||||
artifacts {
|
artifacts {
|
||||||
|
@ -8,10 +8,10 @@ import java.util.*
|
|||||||
* A unique identifier for a single state machine run, valid across node restarts. Note that a single run always
|
* A unique identifier for a single state machine run, valid across node restarts. Note that a single run always
|
||||||
* has at least one flow, but that flow may also invoke sub-flows: they all share the same run id.
|
* has at least one flow, but that flow may also invoke sub-flows: they all share the same run id.
|
||||||
*/
|
*/
|
||||||
|
@DeleteForDJVM
|
||||||
@CordaSerializable
|
@CordaSerializable
|
||||||
data class StateMachineRunId(val uuid: UUID) {
|
data class StateMachineRunId(val uuid: UUID) {
|
||||||
companion object {
|
companion object {
|
||||||
@DeleteForDJVM
|
|
||||||
fun createRandom(): StateMachineRunId = StateMachineRunId(UUID.randomUUID())
|
fun createRandom(): StateMachineRunId = StateMachineRunId(UUID.randomUUID())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package net.corda.core.internal
|
package net.corda.core.internal
|
||||||
|
|
||||||
import co.paralleluniverse.fibers.Suspendable
|
import co.paralleluniverse.fibers.Suspendable
|
||||||
|
import net.corda.core.DeleteForDJVM
|
||||||
import net.corda.core.DoNotImplement
|
import net.corda.core.DoNotImplement
|
||||||
import net.corda.core.concurrent.CordaFuture
|
import net.corda.core.concurrent.CordaFuture
|
||||||
import net.corda.core.context.InvocationContext
|
import net.corda.core.context.InvocationContext
|
||||||
@ -10,6 +11,7 @@ import net.corda.core.node.ServiceHub
|
|||||||
import org.slf4j.Logger
|
import org.slf4j.Logger
|
||||||
|
|
||||||
/** This is an internal interface that is implemented by code in the node module. You should look at [FlowLogic]. */
|
/** This is an internal interface that is implemented by code in the node module. You should look at [FlowLogic]. */
|
||||||
|
@DeleteForDJVM
|
||||||
@DoNotImplement
|
@DoNotImplement
|
||||||
interface FlowStateMachine<FLOWRETURN> {
|
interface FlowStateMachine<FLOWRETURN> {
|
||||||
@Suspendable
|
@Suspendable
|
||||||
|
@ -74,6 +74,7 @@ task predeterminise(type: ProGuardTask, dependsOn: project(':core-deterministic'
|
|||||||
dontpreverify
|
dontpreverify
|
||||||
dontobfuscate
|
dontobfuscate
|
||||||
dontoptimize
|
dontoptimize
|
||||||
|
dontnote
|
||||||
printseeds
|
printseeds
|
||||||
verbose
|
verbose
|
||||||
|
|
||||||
@ -114,6 +115,7 @@ task determinise(type: ProGuardTask) {
|
|||||||
keepattributes '*'
|
keepattributes '*'
|
||||||
keepdirectories
|
keepdirectories
|
||||||
dontobfuscate
|
dontobfuscate
|
||||||
|
dontnote
|
||||||
printseeds
|
printseeds
|
||||||
verbose
|
verbose
|
||||||
|
|
||||||
@ -152,7 +154,6 @@ task checkDeterminism(type: ProGuardTask, dependsOn: jdkTask) {
|
|||||||
defaultTasks "determinise"
|
defaultTasks "determinise"
|
||||||
determinise.finalizedBy metafix
|
determinise.finalizedBy metafix
|
||||||
metafix.finalizedBy checkDeterminism
|
metafix.finalizedBy checkDeterminism
|
||||||
assemble.dependsOn checkDeterminism
|
|
||||||
|
|
||||||
def deterministicJar = metafix.outputs.files.singleFile
|
def deterministicJar = metafix.outputs.files.singleFile
|
||||||
artifacts {
|
artifacts {
|
||||||
|
@ -8,6 +8,7 @@ import java.nio.ByteBuffer
|
|||||||
|
|
||||||
@KeepForDJVM
|
@KeepForDJVM
|
||||||
class OrdinalBits(private val ordinal: Int) {
|
class OrdinalBits(private val ordinal: Int) {
|
||||||
|
@KeepForDJVM
|
||||||
interface OrdinalWriter {
|
interface OrdinalWriter {
|
||||||
val bits: OrdinalBits
|
val bits: OrdinalBits
|
||||||
@JvmDefault val encodedSize get() = 1
|
@JvmDefault val encodedSize get() = 1
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.corda.serialization.internal.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
|
import net.corda.core.KeepForDJVM
|
||||||
import net.corda.core.internal.uncheckedCast
|
import net.corda.core.internal.uncheckedCast
|
||||||
import net.corda.core.serialization.SerializationContext
|
import net.corda.core.serialization.SerializationContext
|
||||||
import net.corda.serialization.internal.amqp.SerializerFactory.Companion.nameForType
|
import net.corda.serialization.internal.amqp.SerializerFactory.Companion.nameForType
|
||||||
@ -58,6 +59,7 @@ abstract class CustomSerializer<T : Any> : AMQPSerializer<T>, SerializerFor {
|
|||||||
* subclass in the schema, so that we can distinguish between subclasses.
|
* subclass in the schema, so that we can distinguish between subclasses.
|
||||||
*/
|
*/
|
||||||
// TODO: should this be a custom serializer at all, or should it just be a plain AMQPSerializer?
|
// TODO: should this be a custom serializer at all, or should it just be a plain AMQPSerializer?
|
||||||
|
@KeepForDJVM
|
||||||
class SubClass<T : Any>(private val clazz: Class<*>, private val superClassSerializer: CustomSerializer<T>) : CustomSerializer<T>() {
|
class SubClass<T : Any>(private val clazz: Class<*>, private val superClassSerializer: CustomSerializer<T>) : CustomSerializer<T>() {
|
||||||
// TODO: should this be empty or contain the schema of the super?
|
// TODO: should this be empty or contain the schema of the super?
|
||||||
override val schemaForDocumentation = Schema(emptyList())
|
override val schemaForDocumentation = Schema(emptyList())
|
||||||
|
@ -70,6 +70,7 @@ enum class TransformTypes(val build: (Annotation) -> Transform) : DescribedType
|
|||||||
* @param constants The list of enum constants on the type the transforms are being applied to
|
* @param constants The list of enum constants on the type the transforms are being applied to
|
||||||
*/
|
*/
|
||||||
override fun validate(list: List<Transform>, constants: Map<String, Int>) {
|
override fun validate(list: List<Transform>, constants: Map<String, Int>) {
|
||||||
|
@KeepForDJVM
|
||||||
data class Node(val transform: RenameSchemaTransform, var next: Node?, var prev: Node?, var visitedBy: Node? = null) {
|
data class Node(val transform: RenameSchemaTransform, var next: Node?, var prev: Node?, var visitedBy: Node? = null) {
|
||||||
fun visit(visitedBy: Node) {
|
fun visit(visitedBy: Node) {
|
||||||
this.visitedBy = visitedBy
|
this.visitedBy = visitedBy
|
||||||
|
@ -154,6 +154,7 @@ class EnumDefaultSchemaTransform(val old: String, val new: String) : Transform()
|
|||||||
* @property from the name of the property or constant prior to being changed, i.e. what it was
|
* @property from the name of the property or constant prior to being changed, i.e. what it was
|
||||||
* @property to the new name of the property or constant after the change has been made, i.e. what it is now
|
* @property to the new name of the property or constant after the change has been made, i.e. what it is now
|
||||||
*/
|
*/
|
||||||
|
@KeepForDJVM
|
||||||
class RenameSchemaTransform(val from: String, val to: String) : Transform() {
|
class RenameSchemaTransform(val from: String, val to: String) : Transform() {
|
||||||
companion object : DescribedTypeConstructor<RenameSchemaTransform> {
|
companion object : DescribedTypeConstructor<RenameSchemaTransform> {
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user