Skip to content

Commit 0d15b52

Browse files
authored
Merge pull request #1 from openremote/enhancement/up-to-date
Enhancement/up to date
2 parents 115114a + 655d680 commit 0d15b52

File tree

14 files changed

+177
-157
lines changed

14 files changed

+177
-157
lines changed

build.gradle.kts

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ buildscript {
77
}
88

99
plugins {
10-
kotlin("jvm") version "1.5.31"
10+
kotlin("jvm") version "1.9.25"
1111
id("java-gradle-plugin")
1212
id("maven-publish")
13-
id("com.github.ben-manes.versions") version "0.42.0"
14-
id("io.gitlab.arturbosch.detekt") version "1.20.0"
15-
id("com.gradle.plugin-publish") version "1.0.0-rc-1"
13+
id("com.github.ben-manes.versions") version "0.51.0"
14+
id("io.gitlab.arturbosch.detekt") version "1.23.8"
15+
id("com.gradle.plugin-publish") version "2.0.0"
1616
}
1717

18-
group = "com.cherryperry.gfe"
19-
version = "2.0.3"
18+
group = "io.openremote.com.cherryperry.gfe"
19+
version = "2.1.0"
2020

2121
java {
2222
sourceCompatibility = JavaVersion.VERSION_1_8
@@ -26,7 +26,7 @@ java {
2626
tasks.withType<KotlinCompile> {
2727
kotlinOptions {
2828
jvmTarget = JavaVersion.VERSION_1_8.toString()
29-
apiVersion = "1.3"
29+
apiVersion = "1.9"
3030
}
3131
}
3232

@@ -36,20 +36,17 @@ detekt {
3636
}
3737

3838
gradlePlugin {
39+
website = "https://github.com/CherryPerry/GradleFileEncrypt"
40+
vcsUrl = "https://github.com/CherryPerry/GradleFileEncrypt.git"
3941
plugins.register("gradleFileEncryptPlugin") {
40-
id = "com.cherryperry.gradle-file-encrypt"
42+
id = "io.openremote.com.cherryperry.gradle-file-encrypt"
4143
displayName = "Gradle file encrypt"
4244
description = "Simply encrypt your sensitive data in repository with password"
45+
tags = listOf("encryption", "cryptography")
4346
implementationClass = "com.cherryperry.gfe.FileEncryptPlugin"
4447
}
4548
}
4649

47-
pluginBundle {
48-
website = "https://github.com/CherryPerry/GradleFileEncrypt"
49-
vcsUrl = "https://github.com/CherryPerry/GradleFileEncrypt.git"
50-
tags = listOf("encryption", "cryptography")
51-
}
52-
5350
repositories {
5451
mavenCentral()
5552
}
@@ -59,5 +56,6 @@ dependencies {
5956
compileOnly(gradleApi())
6057
testImplementation("junit", "junit", "4.13.2")
6158
testImplementation(gradleTestKit())
62-
detektPlugins("io.gitlab.arturbosch.detekt", "detekt-formatting", "1.20.0")
59+
detektPlugins("io.gitlab.arturbosch.detekt", "detekt-formatting", "1.23.8")
60+
detektPlugins("io.gitlab.arturbosch.detekt", "detekt-rules-libraries", "1.23.8")
6361
}

detekt.yml

Lines changed: 33 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ complexity:
9191
threshold: 10
9292
includeStaticDeclarations: false
9393
includePrivateDeclarations: false
94-
ComplexMethod:
94+
CyclomaticComplexMethod:
9595
active: true
9696
threshold: 15
9797
ignoreSingleWhenExpression: false
@@ -279,12 +279,26 @@ exceptions:
279279
- 'RuntimeException'
280280
- 'Throwable'
281281

282+
libraries:
283+
active: true
284+
ForbiddenPublicDataClass:
285+
active: true
286+
excludes: [ '**' ]
287+
ignorePackages:
288+
- '*.internal'
289+
- '*.internal.*'
290+
LibraryCodeMustSpecifyReturnType:
291+
active: true
292+
excludes: ['**']
293+
LibraryEntitiesShouldNotBePublic:
294+
active: true
295+
excludes: ['**']
296+
282297
naming:
283298
active: true
284299
BooleanPropertyNaming:
285300
active: false
286301
allowedPattern: '^(is|has|are)'
287-
ignoreOverridden: true
288302
ClassNaming:
289303
active: true
290304
classPattern: '[A-Z][a-zA-Z0-9]*'
@@ -293,7 +307,6 @@ naming:
293307
parameterPattern: '[a-z][A-Za-z0-9]*'
294308
privateParameterPattern: '[a-z][A-Za-z0-9]*'
295309
excludeClassPattern: '$^'
296-
ignoreOverridden: true
297310
EnumNaming:
298311
active: true
299312
enumEntryPattern: '[A-Z][_a-zA-Z0-9]*'
@@ -311,12 +324,10 @@ naming:
311324
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
312325
functionPattern: '[a-z][a-zA-Z0-9]*'
313326
excludeClassPattern: '$^'
314-
ignoreOverridden: true
315327
FunctionParameterNaming:
316328
active: true
317329
parameterPattern: '[a-z][A-Za-z0-9]*'
318330
excludeClassPattern: '$^'
319-
ignoreOverridden: true
320331
InvalidPackageDeclaration:
321332
active: false
322333
rootPackage: ''
@@ -358,7 +369,6 @@ naming:
358369
variablePattern: '[a-z][A-Za-z0-9]*'
359370
privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*'
360371
excludeClassPattern: '$^'
361-
ignoreOverridden: true
362372

363373
performance:
364374
active: true
@@ -396,8 +406,6 @@ potential-bugs:
396406
- 'java.util.HashSet'
397407
- 'java.util.LinkedHashMap'
398408
- 'java.util.HashMap'
399-
DuplicateCaseInWhenExpression:
400-
active: true
401409
ElseCaseInsteadOfExhaustiveWhen:
402410
active: false
403411
EqualsAlwaysReturnsTrueOrFalse:
@@ -412,7 +420,7 @@ potential-bugs:
412420
active: false
413421
IgnoredReturnValue:
414422
active: false
415-
restrictToAnnotatedMethods: true
423+
restrictToConfig: true
416424
returnValueAnnotations:
417425
- '*.CheckResult'
418426
- '*.CheckReturnValue'
@@ -439,15 +447,10 @@ potential-bugs:
439447
MissingPackageDeclaration:
440448
active: false
441449
excludes: ['**/*.kts']
442-
MissingWhenCase:
443-
active: true
444-
allowElseExpression: true
445450
NullCheckOnMutableProperty:
446451
active: false
447452
NullableToStringCall:
448453
active: false
449-
RedundantElseInWhen:
450-
active: true
451454
UnconditionalJumpStatementInLoop:
452455
active: false
453456
UnnecessaryNotNullOperator:
@@ -472,6 +475,8 @@ potential-bugs:
472475

473476
style:
474477
active: true
478+
BracesOnWhenStatements:
479+
active: false
475480
CanBeNonNullable:
476481
active: false
477482
ClassOrdering:
@@ -480,7 +485,8 @@ style:
480485
active: false
481486
DataClassContainsFunctions:
482487
active: false
483-
conversionFunctionPrefix: 'to'
488+
conversionFunctionPrefix:
489+
- 'to'
484490
DataClassShouldBeImmutable:
485491
active: false
486492
DestructuringDeclarationWithTooManyEntries:
@@ -499,12 +505,14 @@ style:
499505
includeLineWrapping: false
500506
ForbiddenComment:
501507
active: true
502-
values:
503-
- 'FIXME:'
504-
- 'STOPSHIP:'
505-
- 'TODO:'
508+
comments:
509+
- reason: 'Forbidden FIXME todo marker in comment, please fix the problem.'
510+
value: 'FIXME:'
511+
- reason: 'Forbidden STOPSHIP todo marker in comment, please address the problem before shipping the code.'
512+
value: 'STOPSHIP:'
513+
- reason: 'Forbidden TODO todo marker in comment, please do the changes.'
514+
value: 'TODO:'
506515
allowedPatterns: ''
507-
customMessage: ''
508516
ForbiddenImport:
509517
active: false
510518
imports: []
@@ -514,12 +522,6 @@ style:
514522
methods:
515523
- 'kotlin.io.print'
516524
- 'kotlin.io.println'
517-
ForbiddenPublicDataClass:
518-
active: true
519-
excludes: ['**']
520-
ignorePackages:
521-
- '*.internal'
522-
- '*.internal.*'
523525
ForbiddenVoid:
524526
active: false
525527
ignoreOverridden: false
@@ -528,13 +530,8 @@ style:
528530
active: true
529531
ignoreOverridableFunction: true
530532
ignoreActualFunction: true
531-
excludedFunctions: ''
532-
LibraryCodeMustSpecifyReturnType:
533-
active: true
534-
excludes: ['**']
535-
LibraryEntitiesShouldNotBePublic:
536-
active: true
537-
excludes: ['**']
533+
excludedFunctions:
534+
- ''
538535
LoopWithTooManyJumpStatements:
539536
active: true
540537
maxJumpCount: 1
@@ -556,8 +553,6 @@ style:
556553
ignoreEnums: false
557554
ignoreRanges: false
558555
ignoreExtensionFunctions: true
559-
MandatoryBracesIfStatements:
560-
active: false
561556
MandatoryBracesLoops:
562557
active: false
563558
MaxLineLength:
@@ -584,8 +579,6 @@ style:
584579
active: true
585580
OptionalUnit:
586581
active: false
587-
OptionalWhenBraces:
588-
active: false
589582
PreferToOverPairSyntax:
590583
active: false
591584
ProtectedMemberInFinalClass:
@@ -599,7 +592,8 @@ style:
599592
ReturnCount:
600593
active: true
601594
max: 2
602-
excludedFunctions: 'equals'
595+
excludedFunctions:
596+
- 'equals'
603597
excludeLabeled: false
604598
excludeReturnFromLambda: true
605599
excludeGuardClauses: false
@@ -679,4 +673,4 @@ style:
679673
active: true
680674
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
681675
excludeImports:
682-
- 'java.util.*'
676+
- 'java.util.*'

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
org.gradle.jvmargs=-Xmx512m -XX:MaxPermSize=128m
1+
org.gradle.jvmargs=-Xmx512m
22
org.gradle.caching=true
33
org.gradle.parallel=true
44
org.gradle.vfs.watch=true

gradle/wrapper/gradle-wrapper.jar

2.04 KB
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
4+
networkTimeout=10000
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

gradlew

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Darwin, MinGW, and NonStop.
5656
#
5757
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959
# within the Gradle project.
6060
#
6161
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,10 +80,10 @@ do
8080
esac
8181
done
8282

83-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84-
85-
APP_NAME="Gradle"
83+
# This is normally unused
84+
# shellcheck disable=SC2034
8685
APP_BASE_NAME=${0##*/}
86+
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
8787

8888
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
8989
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
@@ -143,12 +143,16 @@ fi
143143
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144144
case $MAX_FD in #(
145145
max*)
146+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147+
# shellcheck disable=SC3045
146148
MAX_FD=$( ulimit -H -n ) ||
147149
warn "Could not query maximum file descriptor limit"
148150
esac
149151
case $MAX_FD in #(
150152
'' | soft) :;; #(
151153
*)
154+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155+
# shellcheck disable=SC3045
152156
ulimit -n "$MAX_FD" ||
153157
warn "Could not set maximum file descriptor limit to $MAX_FD"
154158
esac
@@ -205,6 +209,12 @@ set -- \
205209
org.gradle.wrapper.GradleWrapperMain \
206210
"$@"
207211

212+
# Stop when "xargs" is not available.
213+
if ! command -v xargs >/dev/null 2>&1
214+
then
215+
die "xargs is not available"
216+
fi
217+
208218
# Use "xargs" to parse quoted args.
209219
#
210220
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.

0 commit comments

Comments
 (0)