diff --git a/buildSrc/src/main/kotlin/uk/gov/justice/digital/hmpps/plugins/JibConfigPlugin.kt b/buildSrc/src/main/kotlin/uk/gov/justice/digital/hmpps/plugins/JibConfigPlugin.kt index 58182fc444..ee61f2f374 100644 --- a/buildSrc/src/main/kotlin/uk/gov/justice/digital/hmpps/plugins/JibConfigPlugin.kt +++ b/buildSrc/src/main/kotlin/uk/gov/justice/digital/hmpps/plugins/JibConfigPlugin.kt @@ -75,7 +75,7 @@ class JibConfigPlugin : Plugin { "$buildDir/classes", "$buildDir/generated", "$buildDir/resources", - project.configurations[jib!!.configurationName.get()].resolvedConfiguration.files + project.configurations[jib!!.configurationName.get()].resolvedConfiguration.resolvedArtifacts.map { it.file } ) outputs.file("$buildDir/jib-image.id") outputs.cacheIf { true } diff --git a/gradle.properties b/gradle.properties index 13c47f9710..1b387ffcbb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,7 @@ org.gradle.parallel=true org.gradle.caching=true org.gradle.configuration-cache=true +org.gradle.configuration-cache.parallel=true org.gradle.configuration-cache.problems=warn # Remove the above line once https://github.com/n0mer/gradle-git-properties/pull/235 is released org.gradle.jvmargs=-Xmx4g "-XX:MaxMetaspaceSize=1g" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fb602ee2af..82dd18b204 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26 -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip +distributionSha256Sum=57dafb5c2622c6cc08b993c85b7c06956a2f53536432a30ead46166dbca0f1e9 +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/libs/commons/src/main/kotlin/uk/gov/justice/digital/hmpps/ldap/LdapTemplateExtensions.kt b/libs/commons/src/main/kotlin/uk/gov/justice/digital/hmpps/ldap/LdapTemplateExtensions.kt index 040bebd336..9ed652e09b 100644 --- a/libs/commons/src/main/kotlin/uk/gov/justice/digital/hmpps/ldap/LdapTemplateExtensions.kt +++ b/libs/commons/src/main/kotlin/uk/gov/justice/digital/hmpps/ldap/LdapTemplateExtensions.kt @@ -30,12 +30,13 @@ fun LdapTemplate.findEmailByUsername(@SpanAttribute username: String) = findAttr @WithSpan fun LdapTemplate.findAttributeByUsername(@SpanAttribute username: String, @SpanAttribute attribute: String) = try { - search(query() - .attributes(attribute) - .searchScope(SearchScope.ONELEVEL) - .where("objectclass").`is`("inetOrgPerson") - .and("objectclass").`is`("top") - .and("cn").`is`(username), + search( + query() + .attributes(attribute) + .searchScope(SearchScope.ONELEVEL) + .where("objectclass").`is`("inetOrgPerson") + .and("objectclass").`is`("top") + .and("cn").`is`(username), AttributesMapper { it[attribute]?.get()?.toString() } ).singleOrNull() } catch (_: NameNotFoundException) { @@ -44,12 +45,13 @@ fun LdapTemplate.findAttributeByUsername(@SpanAttribute username: String, @SpanA @WithSpan fun LdapTemplate.getRoles(@SpanAttribute username: String) = try { - search(query() - .attributes("cn") - .base(LdapNameBuilder.newInstance().add("cn", username).build()) - .searchScope(SearchScope.ONELEVEL) - .where("objectclass").`is`("NDRole") - .or("objectclass").`is`("NDRoleAssociation"), + search( + query() + .attributes("cn") + .base(LdapNameBuilder.newInstance().add("cn", username).build()) + .searchScope(SearchScope.ONELEVEL) + .where("objectclass").`is`("NDRole") + .or("objectclass").`is`("NDRoleAssociation"), AttributesMapper { it["cn"]?.get()?.toString() } ).filterNotNull() } catch (_: NameNotFoundException) { diff --git a/projects/approved-premises-and-delius/src/dev/kotlin/uk/gov/justice/digital/hmpps/data/ProbationCaseDataLoader.kt b/projects/approved-premises-and-delius/src/dev/kotlin/uk/gov/justice/digital/hmpps/data/ProbationCaseDataLoader.kt index 8e9d8f3615..56deb3a926 100644 --- a/projects/approved-premises-and-delius/src/dev/kotlin/uk/gov/justice/digital/hmpps/data/ProbationCaseDataLoader.kt +++ b/projects/approved-premises-and-delius/src/dev/kotlin/uk/gov/justice/digital/hmpps/data/ProbationCaseDataLoader.kt @@ -123,11 +123,12 @@ class ProbationCaseDataLoader( personalCircumstanceTypeRepository.saveAll(PersonalCircumstanceGenerator.PC_TYPES) personalCircumstanceSubTypeRepository.saveAll(PersonalCircumstanceGenerator.PC_SUB_TYPES) - personalCircumstanceRepository.save(PersonalCircumstanceGenerator.generate( - ProbationCaseGenerator.CASE_COMPLEX.id, - PersonalCircumstanceGenerator.PC_TYPES.first { it.code == PersonalCircumstanceType.Code.VETERAN.value }, - PersonalCircumstanceGenerator.PC_SUB_TYPES.first { it.description == PersonalCircumstanceType.Code.VETERAN.value + "SUB" } - )) + personalCircumstanceRepository.save( + PersonalCircumstanceGenerator.generate( + ProbationCaseGenerator.CASE_COMPLEX.id, + PersonalCircumstanceGenerator.PC_TYPES.first { it.code == PersonalCircumstanceType.Code.VETERAN.value }, + PersonalCircumstanceGenerator.PC_SUB_TYPES.first { it.description == PersonalCircumstanceType.Code.VETERAN.value + "SUB" } + )) mutableLimitedAccessPersonRepository.save(RESTRICTED_CASE) mutableLimitedAccessPersonRepository.save(EXCLUDED_CASE) diff --git a/projects/court-case-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/service/DocumentService.kt b/projects/court-case-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/service/DocumentService.kt index e474fbc362..a758f4f1c9 100644 --- a/projects/court-case-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/service/DocumentService.kt +++ b/projects/court-case-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/service/DocumentService.kt @@ -42,7 +42,8 @@ class DocumentService( val convictions = convictionDocuments .groupBy { it.eventId } .map { - ConvictionDocuments(it.key.toString(), + ConvictionDocuments( + it.key.toString(), it.value.map { d -> d.toOffenderDocumentDetail() } .filter { odd -> filter(odd, filterData) }) } diff --git a/projects/court-case-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/service/OffenderService.kt b/projects/court-case-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/service/OffenderService.kt index 533d399124..0b42b40fae 100644 --- a/projects/court-case-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/service/OffenderService.kt +++ b/projects/court-case-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/service/OffenderService.kt @@ -217,7 +217,8 @@ fun DisabilityEntity.toDisability() = Disability( startDate = startDate ) -fun DocumentEntity?.toPreviousConviction() = PreviousConviction(convictionDate = this?.dateProduced?.toLocalDate(), +fun DocumentEntity?.toPreviousConviction() = PreviousConviction( + convictionDate = this?.dateProduced?.toLocalDate(), detail = this?.name?.let { ImmutableMap.of("documentName", it) }) fun Person.toProfile(previousConviction: DocumentEntity?) = OffenderProfile( diff --git a/projects/justice-email-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/messaging/Handler.kt b/projects/justice-email-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/messaging/Handler.kt index 3e37b122e5..7ccfd7cc97 100644 --- a/projects/justice-email-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/messaging/Handler.kt +++ b/projects/justice-email-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/messaging/Handler.kt @@ -84,12 +84,13 @@ class Handler( private fun findStaffIdForEmailAddress(emailAddress: String): Long? { val matchingStaffIds = try { ldapTemplate - .search(query() - .attributes("cn") - .searchScope(SearchScope.ONELEVEL) - .where("objectclass").`is`("inetOrgPerson") - .and("objectclass").`is`("top") - .and("mail").`is`(emailAddress), + .search( + query() + .attributes("cn") + .searchScope(SearchScope.ONELEVEL) + .where("objectclass").`is`("inetOrgPerson") + .and("objectclass").`is`("top") + .and("mail").`is`(emailAddress), AttributesMapper { it["cn"]?.get()?.toString() }) .filterNotNull() .mapNotNull { staffRepository.findByUserUsername(it)?.id } diff --git a/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/ComplianceService.kt b/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/ComplianceService.kt index b2436cff59..b0b1445471 100644 --- a/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/ComplianceService.kt +++ b/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/ComplianceService.kt @@ -76,7 +76,8 @@ class ComplianceService( return PersonCompliance( personSummary = summary.toPersonSummary(), currentSentences = currentSentences.mapNotNull { it.toSentenceCompliance() }, - previousOrders = PreviousOrders(breaches = previousOrders.map { breachesForSentence(it.id) }.count(), + previousOrders = PreviousOrders( + breaches = previousOrders.map { breachesForSentence(it.id) }.count(), count = previousOrders.size, orders = previousOrders.mapNotNull { it.disposal?.toOrder( diff --git a/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/PersonalDetailsService.kt b/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/PersonalDetailsService.kt index c2d4c09bd2..3399049e22 100644 --- a/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/PersonalDetailsService.kt +++ b/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/PersonalDetailsService.kt @@ -58,7 +58,8 @@ class PersonalDetailsService( preferredName = person.preferredName, telephoneNumber = person.telephoneNumber, mobileNumber = person.mobileNumber, - circumstances = Circumstances(lastUpdated = personalCircumstances.maxOfOrNull { it.lastUpdated }, + circumstances = Circumstances( + lastUpdated = personalCircumstances.maxOfOrNull { it.lastUpdated }, circumstances = personalCircumstances.map { PersonalCircumstance( it.subType.description, diff --git a/projects/workforce-allocations-to-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/allocations/ManagerService.kt b/projects/workforce-allocations-to-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/allocations/ManagerService.kt index 659cb5699e..0ccaec092c 100644 --- a/projects/workforce-allocations-to-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/allocations/ManagerService.kt +++ b/projects/workforce-allocations-to-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/allocations/ManagerService.kt @@ -47,7 +47,7 @@ abstract class ManagerService( staffId = newManager.staff.id, providerId = newManager.provider.id, notes = - """ + """ |Transfer Reason: Internal Transfer |Transfer Date: ${newManager.startDate.format(DateTimeFormatter.ofPattern("dd/MM/yyyy"))} |From Trust: ${newManager.provider.description} @@ -55,7 +55,7 @@ abstract class ManagerService( |From Officer: ${oldManager.staff.displayName} |-------------------------------/${System.lineSeparator()} |""" - .trimMargin() + .trimMargin() ) } diff --git a/tools/ingress-testing/api-client/gradle/wrapper/gradle-wrapper.properties b/tools/ingress-testing/api-client/gradle/wrapper/gradle-wrapper.properties index fb602ee2af..82dd18b204 100644 --- a/tools/ingress-testing/api-client/gradle/wrapper/gradle-wrapper.properties +++ b/tools/ingress-testing/api-client/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26 -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip +distributionSha256Sum=57dafb5c2622c6cc08b993c85b7c06956a2f53536432a30ead46166dbca0f1e9 +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME