Skip to content

Commit 99aad31

Browse files
[BROKEN] Updated to point to latest ONIXlabs dependencies.
1 parent 4875f83 commit 99aad31

28 files changed

+290
-390
lines changed

build.gradle

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ buildscript {
1414
junit_version = '5.3.1'
1515

1616
onixlabs_group = 'io.onixlabs'
17-
onixlabs_corda_core_release_version = '2.0.0'
18-
onixlabs_corda_idfx_release_version = '2.0.0'
17+
onixlabs_corda_core_release_version = '3.0.0'
18+
onixlabs_corda_idfx_release_version = '3.0.0'
1919

20-
cordapp_platform_version = 8
20+
cordapp_platform_version = 10
2121
cordapp_contract_name = 'ONIXLabs Corda BNMS Contract'
2222
cordapp_workflow_name = 'ONIXLabs Corda BNMS Workflow'
2323
cordapp_vendor_name = 'ONIXLabs'
@@ -44,8 +44,8 @@ buildscript {
4444
}
4545
}
4646

47-
group 'io.onixlabs'
48-
version '2.0.0-rc1'
47+
group getProperty('group')
48+
version getProperty('version')
4949

5050
subprojects {
5151
repositories {
@@ -93,10 +93,16 @@ subprojects {
9393
}
9494
}
9595

96+
task sourceJar(type: Jar) {
97+
from sourceSets.main.allSource
98+
archiveClassifier = "sources"
99+
}
100+
96101
jar { exclude '**/log4j2*.xml' }
97102

98103
test {
99104
jvmArgs = ["-ea", "-javaagent:../lib/quasar.jar"]
105+
maxHeapSize = "4096m"
100106
useJUnitPlatform()
101107
}
102108
}

gradle.properties

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
name=onixlabs-corda-bnms
22
group=io.onixlabs
33
version=2.0.0
4-
5-
kotlin.incremental=false
6-
kotlin.code.style=official
7-
84
onixlabs.development.jarsign.keystore=../lib/onixlabs.development.pkcs12
95
onixlabs.development.jarsign.password=5891f47942424d2acbe108691fdb5ba258712fca7e4762be4327241ebf3dbfa3

onixlabs-corda-bnms-contract/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ publishing {
5454
groupId = project.parent.group
5555
version = project.parent.version
5656
artifactId = 'onixlabs-corda-bnms-contract'
57+
artifact sourceJar
5758
from components.java
5859
}
5960
}

onixlabs-corda-bnms-contract/src/main/kotlin/io/onixlabs/corda/bnms/contract/Configuration.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
package io.onixlabs.corda.bnms.contract
1818

1919
import io.onixlabs.corda.core.contract.Hashable
20+
import io.onixlabs.corda.identityframework.contract.filterByProperty
21+
import io.onixlabs.corda.identityframework.contract.filterByType
2022
import net.corda.core.crypto.SecureHash
2123
import net.corda.core.serialization.CordaSerializable
2224

Lines changed: 106 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,106 @@
1-
/*
2-
* Copyright 2020-2021 ONIXLabs
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
16-
17-
package io.onixlabs.corda.bnms.contract
18-
19-
/**
20-
* Only declared so that I can fit method signatures on a single line.
21-
*/
22-
private typealias Settings = Iterable<Setting<*>>
23-
24-
/**
25-
* Casts a [Setting] of an unknown value type to a [Setting] of type [T].
26-
*
27-
* @param T The underlying value type of the cast [Setting].
28-
* @param type The value type to cast to.
29-
* @return Returns a [Setting] of type [T].
30-
* @throws ClassCastException if the value type cannot be cast to type [T].
31-
*/
32-
fun <T : Any> Setting<*>.cast(type: Class<T>): Setting<T> {
33-
return Setting(property, type.cast(value))
34-
}
35-
36-
/**
37-
* Casts a [Setting] of an unknown value type to a [Setting] of type [T].
38-
*
39-
* @param T The underlying value type of the cast [Setting].
40-
* @return Returns a [Setting] of type [T].
41-
* @throws ClassCastException if the value type cannot be cast to type [T].
42-
*/
43-
inline fun <reified T : Any> Setting<*>.cast(): Setting<T> {
44-
return cast(T::class.java)
45-
}
46-
47-
/**
48-
* Casts an [Iterable] of [Setting] of an unknown value type to an [Iterable] of [Setting] of type [T].
49-
*
50-
* @param T The underlying value type of the cast [Setting].
51-
* @param type The value type to cast to.
52-
* @return Returns an [Iterable] of [Setting] of type [T].
53-
* @throws ClassCastException if the value type cannot be cast to type [T].
54-
*/
55-
fun <T : Any> Settings.cast(type: Class<T>): List<Setting<T>> {
56-
return map { it.cast(type) }
57-
}
58-
59-
/**
60-
* Casts an [Iterable] of [Setting] of an unknown value type to an [Iterable] of [Setting] of type [T].
61-
*
62-
* @param T The underlying value type of the cast [Setting].
63-
* @return Returns an [Iterable] of [Setting] of type [T].
64-
* @throws ClassCastException if the value type cannot be cast to type [T].
65-
*/
66-
inline fun <reified T : Any> Settings.cast(): List<Setting<T>> {
67-
return cast(T::class.java)
68-
}
69-
70-
/**
71-
* Filters an [Iterable] of [Setting] by the specified setting type, and optionally the setting value type.
72-
*
73-
* @param V The underlying value type.
74-
* @param S The underlying setting type.
75-
* @param settingType The setting type.
76-
* @param valueType The value type, or null if the setting type is derived, or the value type is unknown or a wildcard.
77-
* @return Returns an [Iterable] of [Setting] by the specified setting type, and optionally the setting value type.
78-
*/
79-
fun <V, S : Setting<in V>> Settings.filterByType(settingType: Class<S>, valueType: Class<in V>? = null): List<S> {
80-
val settingsFilteredBySettingType = filter { it.javaClass == settingType }.filterIsInstance(settingType)
81-
return if (valueType != null) settingsFilteredBySettingType.filter { it.value?.javaClass == valueType }
82-
else settingsFilteredBySettingType
83-
}
84-
85-
/**
86-
* Filters an [Iterable] of [Setting] by the specified setting type, and optionally the setting value type.
87-
*
88-
* @param T The underlying setting type.
89-
* @return Returns an [Iterable] of [Setting] by the specified setting type, and optionally the setting value type.
90-
*/
91-
inline fun <reified T : Setting<*>> Iterable<Setting<*>>.filterByType(): List<T> {
92-
val typeInfo = object : SettingTypeInfo<T>() {}
93-
return filterByType(typeInfo.settingType, typeInfo.valueType)
94-
}
95-
96-
/**
97-
* Filters an [Iterable] of [Setting] by the specified property.
98-
*
99-
* @param T The underlying setting type.
100-
* @param property The property to filter by.
101-
* @param ignoreCase Determines whether to ignore the property case when filtering; for example when filtering by a normalized property.
102-
* @return Returns an [Iterable] of [Setting] by the specified property.
103-
*/
104-
fun <T : Setting<*>> Iterable<T>.filterByProperty(property: String, ignoreCase: Boolean = false): List<T> {
105-
return filter { it.property.equals(property, ignoreCase) }
106-
}
1+
///*
2+
// * Copyright 2020-2021 ONIXLabs
3+
// *
4+
// * Licensed under the Apache License, Version 2.0 (the "License");
5+
// * you may not use this file except in compliance with the License.
6+
// * You may obtain a copy of the License at
7+
// *
8+
// * http://www.apache.org/licenses/LICENSE-2.0
9+
// *
10+
// * Unless required by applicable law or agreed to in writing, software
11+
// * distributed under the License is distributed on an "AS IS" BASIS,
12+
// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// * See the License for the specific language governing permissions and
14+
// * limitations under the License.
15+
// */
16+
//
17+
//package io.onixlabs.corda.bnms.contract
18+
//
19+
///**
20+
// * Only declared so that I can fit method signatures on a single line.
21+
// */
22+
//private typealias Settings = Iterable<Setting<*>>
23+
//
24+
///**
25+
// * Casts a [Setting] of an unknown value type to a [Setting] of type [T].
26+
// *
27+
// * @param T The underlying value type of the cast [Setting].
28+
// * @param type The value type to cast to.
29+
// * @return Returns a [Setting] of type [T].
30+
// * @throws ClassCastException if the value type cannot be cast to type [T].
31+
// */
32+
//fun <T : Any> Setting<*>.cast(type: Class<T>): Setting<T> {
33+
// return Setting(property, type.cast(value))
34+
//}
35+
//
36+
///**
37+
// * Casts a [Setting] of an unknown value type to a [Setting] of type [T].
38+
// *
39+
// * @param T The underlying value type of the cast [Setting].
40+
// * @return Returns a [Setting] of type [T].
41+
// * @throws ClassCastException if the value type cannot be cast to type [T].
42+
// */
43+
//inline fun <reified T : Any> Setting<*>.cast(): Setting<T> {
44+
// return cast(T::class.java)
45+
//}
46+
//
47+
///**
48+
// * Casts an [Iterable] of [Setting] of an unknown value type to an [Iterable] of [Setting] of type [T].
49+
// *
50+
// * @param T The underlying value type of the cast [Setting].
51+
// * @param type The value type to cast to.
52+
// * @return Returns an [Iterable] of [Setting] of type [T].
53+
// * @throws ClassCastException if the value type cannot be cast to type [T].
54+
// */
55+
//fun <T : Any> Settings.cast(type: Class<T>): List<Setting<T>> {
56+
// return map { it.cast(type) }
57+
//}
58+
//
59+
///**
60+
// * Casts an [Iterable] of [Setting] of an unknown value type to an [Iterable] of [Setting] of type [T].
61+
// *
62+
// * @param T The underlying value type of the cast [Setting].
63+
// * @return Returns an [Iterable] of [Setting] of type [T].
64+
// * @throws ClassCastException if the value type cannot be cast to type [T].
65+
// */
66+
//inline fun <reified T : Any> Settings.cast(): List<Setting<T>> {
67+
// return cast(T::class.java)
68+
//}
69+
//
70+
///**
71+
// * Filters an [Iterable] of [Setting] by the specified setting type, and optionally the setting value type.
72+
// *
73+
// * @param V The underlying value type.
74+
// * @param S The underlying setting type.
75+
// * @param settingType The setting type.
76+
// * @param valueType The value type, or null if the setting type is derived, or the value type is unknown or a wildcard.
77+
// * @return Returns an [Iterable] of [Setting] by the specified setting type, and optionally the setting value type.
78+
// */
79+
//fun <V, S : Setting<in V>> Settings.filterByType(settingType: Class<S>, valueType: Class<in V>? = null): List<S> {
80+
// val settingsFilteredBySettingType = filter { it.javaClass == settingType }.filterIsInstance(settingType)
81+
// return if (valueType != null) settingsFilteredBySettingType.filter { it.value?.javaClass == valueType }
82+
// else settingsFilteredBySettingType
83+
//}
84+
//
85+
///**
86+
// * Filters an [Iterable] of [Setting] by the specified setting type, and optionally the setting value type.
87+
// *
88+
// * @param T The underlying setting type.
89+
// * @return Returns an [Iterable] of [Setting] by the specified setting type, and optionally the setting value type.
90+
// */
91+
//inline fun <reified T : Setting<*>> Iterable<Setting<*>>.filterByType(): List<T> {
92+
// val typeInfo = object : SettingTypeInfo<T>() {}
93+
// return filterByType(typeInfo.settingType, typeInfo.valueType)
94+
//}
95+
//
96+
///**
97+
// * Filters an [Iterable] of [Setting] by the specified property.
98+
// *
99+
// * @param T The underlying setting type.
100+
// * @param property The property to filter by.
101+
// * @param ignoreCase Determines whether to ignore the property case when filtering; for example when filtering by a normalized property.
102+
// * @return Returns an [Iterable] of [Setting] by the specified property.
103+
// */
104+
//fun <T : Setting<*>> Iterable<T>.filterByProperty(property: String, ignoreCase: Boolean = false): List<T> {
105+
// return filter { it.property.equals(property, ignoreCase) }
106+
//}

onixlabs-corda-bnms-contract/src/main/kotlin/io/onixlabs/corda/bnms/contract/Setting.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package io.onixlabs.corda.bnms.contract
1818

1919
import io.onixlabs.corda.core.contract.Hashable
20-
import io.onixlabs.corda.identityframework.contract.Claim
20+
import io.onixlabs.corda.identityframework.contract.claims.Claim
2121
import net.corda.core.crypto.SecureHash
2222
import java.util.*
2323

0 commit comments

Comments
 (0)