diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 86f04bd..bb3b477 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: os: [ windows-latest, ubuntu-latest ] - java: [ 8, 11, 16 ] + java: [ 8, 11, 17 ] steps: - uses: actions/checkout@v2 diff --git a/README.md b/README.md index b93c09d..075bc07 100644 --- a/README.md +++ b/README.md @@ -23,12 +23,12 @@ Votes.insertOrUpdate(Votes.pollId, Votes.userId) { Library is hosted on Maven Central. ```xml - pw.forst + dev.forst exposed-upsert - 1.1.0 + 1.2.0 ``` Gradle: ```kotlin -implementation("pw.forst", "exposed-upsert", "1.1.0") +implementation("dev.forst", "exposed-upsert", "1.2.0") ``` diff --git a/build.gradle.kts b/build.gradle.kts index d181cc3..350cfd0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,19 +2,21 @@ import org.gradle.jvm.tasks.Jar import java.net.URL plugins { - kotlin("jvm") version "1.5.0" + kotlin("jvm") version "1.6.20" `maven-publish` signing id("io.github.gradle-nexus.publish-plugin") version "1.1.0" - id("net.nemerosa.versioning") version "2.14.0" - id("org.jetbrains.dokka") version "1.4.32" - id("io.gitlab.arturbosch.detekt") version "1.17.0" + id("net.nemerosa.versioning") version "2.15.1" + id("org.jetbrains.dokka") version "1.6.10" + id("io.gitlab.arturbosch.detekt") version "1.19.0" } -group = "pw.forst" -base.archivesBaseName = "exposed-upsert" + +group = "dev.forst" +base.archivesName.set("exposed-upsert") +version = (versioning.info?.tag ?: versioning.info?.lastTag ?: versioning.info?.build) ?: "SNAPSHOT" version = (versioning.info?.tag ?: versioning.info?.lastTag ?: versioning.info?.build) ?: "SNAPSHOT" repositories { @@ -22,14 +24,15 @@ repositories { } dependencies { + compileOnly(kotlin("reflect")) compileOnly(kotlin("stdlib-jdk8")) - compileOnly("org.jetbrains.exposed", "exposed-core", "0.31.1") - compileOnly("org.jetbrains.kotlin", "kotlin-reflect", "1.5.0") + + compileOnly("org.jetbrains.exposed", "exposed-core", "0.37.3") } detekt { parallel = true - input = files("$rootDir/src") + source = files("$rootDir/src") config = files(rootDir.resolve("detekt-config.yml")) } @@ -87,19 +90,19 @@ publishing { pom { name.set("exposed-upsert") description.set("Simple upsert implementation for Exposed and PostgreSQL.") - url.set("https://exposed-upsert.forst.pw") + url.set("https://exposed.forst.dev") packaging = "jar" licenses { license { name.set("MIT") - url.set("https://mit-license.org/license.txt") + url.set("https://github.com/LukasForst/exposed-upsert/blob/master/LICENSE") } } developers { developer { id.set("lukasforst") name.set("Lukas Forst") - email.set("lukas@forst.pw") + email.set("lukas@forst.dev") } } scm { diff --git a/detekt-config.yml b/detekt-config.yml index 4e9663e..2a6d073 100644 --- a/detekt-config.yml +++ b/detekt-config.yml @@ -9,6 +9,7 @@ build: config: validation: true + warningsAsErrors: true # when writing own rules with new properties, exclude the property path e.g.: 'my_rule_set,.*>.*>[my_property]' excludes: '' @@ -16,11 +17,18 @@ processors: active: true exclude: - 'DetektProgressListener' + # - 'KtFileCountProcessor' + # - 'PackageCountProcessor' + # - 'ClassCountProcessor' # - 'FunctionCountProcessor' # - 'PropertyCountProcessor' - # - 'ClassCountProcessor' - # - 'PackageCountProcessor' - # - 'KtFileCountProcessor' + # - 'ProjectComplexityProcessor' + # - 'ProjectCognitiveComplexityProcessor' + # - 'ProjectLLOCProcessor' + # - 'ProjectCLOCProcessor' + # - 'ProjectLOCProcessor' + # - 'ProjectSLOCProcessor' + # - 'LicenseHeaderLoaderExtension' console-reports: active: true @@ -30,6 +38,7 @@ console-reports: - 'NotificationReport' # - 'FindingsReport' - 'FileBasedFindingsReport' + - 'LiteFindingsReport' output-reports: active: true @@ -40,27 +49,36 @@ output-reports: comments: active: true - excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] AbsentOrWrongFileLicense: active: false licenseTemplateFile: 'license.template' + licenseTemplateIsRegex: false CommentOverPrivateFunction: active: false CommentOverPrivateProperty: active: false - EndOfSentenceFormat: + DeprecatedBlockTag: active: false + EndOfSentenceFormat: + active: true endOfSentenceFormat: '([.?!][ \t\n\r\f<])|([.?!:]$)' + OutdatedDocumentation: + active: false + matchTypeParameters: true + matchDeclarationsOrder: true UndocumentedPublicClass: - active: true + active: false + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] searchInNestedClass: true searchInInnerClass: true searchInInnerObject: true searchInInnerInterface: true UndocumentedPublicFunction: active: true + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] UndocumentedPublicProperty: active: true + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] complexity: active: true @@ -78,13 +96,22 @@ complexity: ignoreSingleWhenExpression: false ignoreSimpleWhenEntries: false ignoreNestingFunctions: false - nestingFunctions: [ run, let, apply, with, also, use, forEach, isNotNull, ifNull ] + nestingFunctions: + - 'also' + - 'apply' + - 'forEach' + - 'isNotNull' + - 'ifNull' + - 'let' + - 'run' + - 'use' + - 'with' LabeledExpression: active: false ignoredLabels: [ ] LargeClass: active: true - threshold: 600 + threshold: 400 LongMethod: active: true threshold: 60 @@ -94,15 +121,20 @@ complexity: constructorThreshold: 7 ignoreDefaultParameters: false ignoreDataClasses: true - ignoreAnnotated: [ ] + ignoreAnnotatedParameter: [ ] MethodOverloading: active: false threshold: 6 + NamedArguments: + active: true + threshold: 3 NestedBlockDepth: active: true threshold: 4 + ReplaceSafeCallChainWithRun: + active: true StringLiteralDuplication: - active: false + active: true excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] threshold: 3 ignoreAnnotation: true @@ -112,20 +144,30 @@ complexity: # because we don't use classes, this is acceptable active: false excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] - thresholdInFiles: 11 - thresholdInClasses: 11 - thresholdInInterfaces: 11 - thresholdInObjects: 11 - thresholdInEnums: 11 - ignoreDeprecated: false - ignorePrivate: false + thresholdInFiles: 20 + thresholdInClasses: 13 + thresholdInInterfaces: 13 + thresholdInObjects: 13 + thresholdInEnums: 13 + ignoreDeprecated: true + ignorePrivate: true ignoreOverridden: false coroutines: active: true GlobalCoroutineUsage: - active: false + active: true + InjectDispatcher: + active: true + dispatcherNames: + - 'IO' + - 'Default' + - 'Unconfined' RedundantSuspendModifier: + active: true + SleepInsteadOfDelay: + active: true + SuspendFunWithFlowReturnType: active: false empty-blocks: @@ -167,68 +209,88 @@ exceptions: active: true ExceptionRaisedInUnexpectedLocation: active: true - methodNames: [ toString, hashCode, equals, finalize ] + methodNames: + - 'equals' + - 'finalize' + - 'hashCode' + - 'toString' InstanceOfCheckForException: active: false excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] NotImplementedDeclaration: active: false - PrintStackTrace: + ObjectExtendsThrowable: active: false + PrintStackTrace: + active: true RethrowCaughtException: - active: false + active: true ReturnFromFinally: - active: false + active: true ignoreLabeled: false SwallowedException: - active: false + active: true ignoredExceptionTypes: - - InterruptedException - - NumberFormatException - - ParseException - - MalformedURLException + - 'InterruptedException' + - 'MalformedURLException' + - 'NumberFormatException' + - 'ParseException' allowedExceptionNameRegex: '_|(ignore|expected).*' ThrowingExceptionFromFinally: - active: false + active: true ThrowingExceptionInMain: - active: false + active: true ThrowingExceptionsWithoutMessageOrCause: - active: false + active: true excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] exceptions: - - IllegalArgumentException - - IllegalStateException - - IOException + - 'ArrayIndexOutOfBoundsException' + - 'Exception' + - 'IllegalArgumentException' + - 'IllegalMonitorStateException' + - 'IllegalStateException' + - 'IndexOutOfBoundsException' + - 'NullPointerException' + - 'RuntimeException' + - 'Throwable' ThrowingNewInstanceOfSameException: - active: false + active: true TooGenericExceptionCaught: active: true - excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**', '**/Prompt.kt' ] exceptionNames: - - ArrayIndexOutOfBoundsException - - Error - - Exception - - IllegalMonitorStateException - - NullPointerException - - IndexOutOfBoundsException - - RuntimeException - - Throwable + - 'ArrayIndexOutOfBoundsException' + - 'Error' + - 'Exception' + - 'IllegalMonitorStateException' + - 'IndexOutOfBoundsException' + - 'NullPointerException' + - 'RuntimeException' + - 'Throwable' allowedExceptionNameRegex: '_|(ignore|expected).*' TooGenericExceptionThrown: active: true exceptionNames: - - Error - - Exception - - Throwable - - RuntimeException + - 'Error' + - 'Exception' + - 'RuntimeException' + - 'Throwable' formatting: active: true android: false autoCorrect: true AnnotationOnSeparateLine: - active: false + active: true + autoCorrect: true + AnnotationSpacing: + active: true autoCorrect: true + ArgumentListWrapping: + active: true + autoCorrect: true + indentSize: 4 + maxLineLength: 120 ChainWrapping: active: true autoCorrect: true @@ -236,7 +298,7 @@ formatting: active: true autoCorrect: true EnumEntryNameCase: - active: false + active: true autoCorrect: true Filename: active: true @@ -256,6 +318,7 @@ formatting: MaximumLineLength: active: true maxLineLength: 160 + ignoreBackTickedIdentifier: false ModifierOrdering: active: true autoCorrect: true @@ -272,7 +335,7 @@ formatting: active: true autoCorrect: true NoEmptyFirstLineInMethodBlock: - active: false + active: true autoCorrect: true NoLineBreakAfterElse: active: true @@ -304,6 +367,10 @@ formatting: active: true autoCorrect: true indentSize: 4 + maxLineLength: 160 + SpacingAroundAngleBrackets: + active: true + autoCorrect: true SpacingAroundColon: active: true autoCorrect: true @@ -331,6 +398,9 @@ formatting: SpacingAroundRangeOperator: active: true autoCorrect: true + SpacingAroundUnaryOperator: + active: true + autoCorrect: true SpacingBetweenDeclarationsWithAnnotations: active: true autoCorrect: true @@ -343,6 +413,10 @@ formatting: naming: active: true + BooleanPropertyNaming: + active: false + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] + allowedPattern: '^(is|has|are)' ClassNaming: active: true excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] @@ -363,7 +437,7 @@ naming: excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] forbiddenName: [ ] FunctionMaxLength: - active: false + active: true excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] maximumFunctionNameLength: 30 FunctionMinLength: @@ -376,7 +450,6 @@ naming: functionPattern: '([a-z][a-zA-Z0-9]*)|(`.*`)' excludeClassPattern: '$^' ignoreOverridden: true - ignoreAnnotated: [ 'Composable' ] FunctionParameterNaming: active: true excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] @@ -384,14 +457,23 @@ naming: excludeClassPattern: '$^' ignoreOverridden: true InvalidPackageDeclaration: - active: false + active: true rootPackage: '' + LambdaParameterNaming: + active: true + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] + parameterPattern: '[a-z][A-Za-z0-9]*|_' MatchingDeclarationName: active: true mustBeFirst: true MemberNameEqualsClassName: active: true ignoreOverridden: true + NoNameShadowing: + active: true + NonBooleanPropertyPrefixedWithIs: + active: false + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] ObjectPropertyNaming: active: true excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] @@ -409,7 +491,7 @@ naming: propertyPattern: '[A-Za-z][_A-Za-z0-9]*' privatePropertyPattern: '_?[A-Za-z][_A-Za-z0-9]*' VariableMaxLength: - active: false + active: true excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] maximumVariableNameLength: 64 VariableMinLength: @@ -439,24 +521,40 @@ performance: potential-bugs: active: true + AvoidReferentialEquality: + active: true + forbiddenTypePatterns: + - 'kotlin.String' + CastToNullableType: + active: true Deprecation: - active: false + active: true + DontDowncastCollectionTypes: + active: true + DoubleMutabilityForCollection: + active: true DuplicateCaseInWhenExpression: active: true EqualsAlwaysReturnsTrueOrFalse: active: true EqualsWithHashCodeExist: active: true + ExitOutsideMain: + active: false ExplicitGarbageCollectionCall: active: true HasPlatformType: - active: false + active: true IgnoredReturnValue: active: false restrictToAnnotatedMethods: true - returnValueAnnotations: [ '*.CheckReturnValue', '*.CheckResult' ] + returnValueAnnotations: + - '*.CheckResult' + - '*.CheckReturnValue' + ignoreReturnValueAnnotations: + - '*.CanIgnoreReturnValue' ImplicitDefaultLocale: - active: false + active: true ImplicitUnitReturnType: active: false allowExplicitReturnType: true @@ -467,35 +565,47 @@ potential-bugs: IteratorNotThrowingNoSuchElementException: active: true LateinitUsage: - active: false + active: true excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] - excludeAnnotatedProperties: [ ] ignoreOnClassesPattern: '' MapGetWithNotNullAssertionOperator: - active: false + active: true + MissingPackageDeclaration: + active: true + excludes: [ '**/*.kts' ] MissingWhenCase: active: true + allowElseExpression: true + NullableToStringCall: + active: true RedundantElseInWhen: active: true UnconditionalJumpStatementInLoop: - active: false + active: true UnnecessaryNotNullOperator: - active: false + active: true UnnecessarySafeCall: - active: false + active: true + UnreachableCatchBlock: + active: true UnreachableCode: active: true UnsafeCallOnNullableType: active: true + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] UnsafeCast: - active: false + active: true + UnusedUnaryOperator: + active: true UselessPostfixExpression: - active: false + active: true WrongEqualsTypeParameter: active: true style: active: true + ClassOrdering: + active: false CollapsibleIfStatements: active: true DataClassContainsFunctions: @@ -503,10 +613,13 @@ style: conversionFunctionPrefix: 'to' DataClassShouldBeImmutable: active: true + DestructuringDeclarationWithTooManyEntries: + active: true + maxDestructuringEntries: 3 EqualsNullCall: active: true EqualsOnSignatureLine: - active: false + active: true ExplicitCollectionElementAccessMethod: active: false ExplicitItLambdaParameter: @@ -516,52 +629,70 @@ style: includeLineWrapping: false ForbiddenComment: active: true - values: [ 'TODO:', 'FIXME:', 'STOPSHIP:' ] - allowedPatterns: '' + values: + - 'FIXME' + - 'STOPSHIP' + - 'TODO' + allowedPatterns: 'TODO #' + customMessage: '' ForbiddenImport: active: false imports: [ ] forbiddenPatterns: '' ForbiddenMethodCall: - active: true - methods: [ 'kotlin.io.println', 'kotlin.io.print' ] - ForbiddenPublicDataClass: active: false - ignorePackages: [ '*.internal', '*.internal.*' ] + methods: + - 'kotlin.io.print' + - 'kotlin.io.println' + ForbiddenPublicDataClass: + active: true + excludes: [ '**' ] + ignorePackages: + - '*.internal' + - '*.internal.*' ForbiddenVoid: - active: false + active: true ignoreOverridden: false ignoreUsageInGenerics: false FunctionOnlyReturningConstant: active: true ignoreOverridableFunction: true - excludedFunctions: 'describeContents' - excludeAnnotatedFunction: [ 'dagger.Provides' ] + ignoreActualFunction: true + excludedFunctions: '' LibraryCodeMustSpecifyReturnType: active: true + excludes: [ '**' ] + LibraryEntitiesShouldNotBePublic: + active: true + excludes: [ '**' ] LoopWithTooManyJumpStatements: active: true maxJumpCount: 1 MagicNumber: active: true excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] - ignoreNumbers: [ '-1', '0', '1', '2' ] + ignoreNumbers: + - '-1' + - '0' + - '1' + - '2' ignoreHashCodeFunction: true - ignorePropertyDeclaration: false + ignorePropertyDeclaration: true ignoreLocalVariableDeclaration: false ignoreConstantDeclaration: true ignoreCompanionObjectPropertyDeclaration: true - ignoreAnnotation: false + ignoreAnnotation: true ignoreNamedArgument: true - ignoreEnums: false + ignoreEnums: true ignoreRanges: false + ignoreExtensionFunctions: true MandatoryBracesIfStatements: - active: false + active: true MandatoryBracesLoops: - active: false + active: true MaxLineLength: active: true - maxLineLength: 160 + maxLineLength: 140 excludePackageStatements: true excludeImportStatements: true excludeCommentStatements: false @@ -569,12 +700,16 @@ style: active: true ModifierOrder: active: true - NestedClassesVisibility: + MultilineLambdaItParameter: active: false + NestedClassesVisibility: + active: true NewLineAtEndOfFile: active: true NoTabs: active: false + ObjectLiteralToLambda: + active: false OptionalAbstractKeyword: active: true OptionalUnit: @@ -582,13 +717,15 @@ style: OptionalWhenBraces: active: false PreferToOverPairSyntax: - active: false + active: true ProtectedMemberInFinalClass: active: true RedundantExplicitType: active: false - RedundantVisibilityModifierRule: + RedundantHigherOrderMapUsage: active: false + RedundantVisibilityModifierRule: + active: true ReturnCount: active: true max: 2 @@ -599,60 +736,74 @@ style: SafeCast: active: true SerialVersionUIDInSerializableClass: - active: false + active: true SpacingBetweenPackageAndImports: - active: false + active: true ThrowsCount: active: true max: 2 + excludeGuardClauses: false TrailingWhitespace: - active: false + active: true UnderscoresInNumericLiterals: - active: false - acceptableDecimalLength: 5 + active: true + acceptableLength: 4 UnnecessaryAbstractClass: active: true - excludeAnnotatedClasses: [ 'dagger.Module' ] UnnecessaryAnnotationUseSiteTarget: active: false UnnecessaryApply: - active: false + active: true + UnnecessaryFilter: + active: true UnnecessaryInheritance: active: true UnnecessaryLet: - active: false + active: true UnnecessaryParentheses: - active: false + active: true UntilInsteadOfRangeTo: active: false UnusedImports: - active: false + active: true UnusedPrivateClass: active: true UnusedPrivateMember: - active: false + active: true allowedNames: '(_|ignored|expected|serialVersionUID)' + UseAnyOrNoneInsteadOfFind: + active: true UseArrayLiteralsInAnnotations: - active: false + active: true + UseCheckNotNull: + active: true UseCheckOrError: - active: false + active: true UseDataClass: - active: false - excludeAnnotatedClasses: [ ] + active: true allowVars: false UseEmptyCounterpart: active: false + UseIfEmptyOrIfBlank: + active: true UseIfInsteadOfWhen: active: false + UseIsNullOrEmpty: + active: true + UseOrEmpty: + active: true UseRequire: - active: false + active: true + UseRequireNotNull: + active: true UselessCallOnNotNull: active: true UtilityClassWithPublicConstructor: active: true VarCouldBeVal: - active: false + active: true WildcardImport: active: true excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] - excludeImports: [ 'java.util.*', 'kotlinx.android.synthetic.*' ] + excludeImports: + - 'java.util.*' diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index f3d88b1..e708b1c 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 0f80bbf..41dfb87 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 2fe81a7..4f906e0 100755 --- a/gradlew +++ b/gradlew @@ -82,6 +82,7 @@ esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then @@ -129,6 +130,7 @@ fi if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath diff --git a/gradlew.bat b/gradlew.bat index 62bd9b9..107acd3 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init +if "%ERRORLEVEL%" == "0" goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -54,7 +54,7 @@ goto fail set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe -if exist "%JAVA_EXE%" goto init +if exist "%JAVA_EXE%" goto execute echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% @@ -64,28 +64,14 @@ echo location of your Java installation. goto fail -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - :execute @rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell diff --git a/src/main/kotlin/pw/forst/exposed/InsertOrUpdate.kt b/src/main/kotlin/dev/forst/exposed/InsertOrUpdate.kt similarity index 97% rename from src/main/kotlin/pw/forst/exposed/InsertOrUpdate.kt rename to src/main/kotlin/dev/forst/exposed/InsertOrUpdate.kt index 074a7d6..1ceb69f 100644 --- a/src/main/kotlin/pw/forst/exposed/InsertOrUpdate.kt +++ b/src/main/kotlin/dev/forst/exposed/InsertOrUpdate.kt @@ -1,4 +1,4 @@ -package pw.forst.exposed +package dev.forst.exposed import org.jetbrains.exposed.sql.Column import org.jetbrains.exposed.sql.Table diff --git a/src/main/kotlin/pw/forst/exposed/upsert.kt b/src/main/kotlin/dev/forst/exposed/upsert.kt similarity index 96% rename from src/main/kotlin/pw/forst/exposed/upsert.kt rename to src/main/kotlin/dev/forst/exposed/upsert.kt index 6f38d05..8c669b6 100644 --- a/src/main/kotlin/pw/forst/exposed/upsert.kt +++ b/src/main/kotlin/dev/forst/exposed/upsert.kt @@ -1,4 +1,4 @@ -package pw.forst.exposed +package dev.forst.exposed import org.jetbrains.exposed.sql.Column import org.jetbrains.exposed.sql.Table