From a8e11d3ea45893c1a03cfee1caed3d1dcfaa752f Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 27 Mar 2024 08:32:34 +0100 Subject: [PATCH 1/5] Add missing periods. --- schemas/Error.json | 6 +++--- schemas/PollCreation.json | 4 ++-- schemas/SuperProperties.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/schemas/Error.json b/schemas/Error.json index c842a1d..f0d2c7e 100644 --- a/schemas/Error.json +++ b/schemas/Error.json @@ -34,7 +34,7 @@ "type": "string" }, "timeToDecryptMillis": { - "description": "UTDs can be permanent or temporary. If temporary, this field will contain the time it took to decrypt the message in milliseconds. If permanent should be -1", + "description": "UTDs can be permanent or temporary. If temporary, this field will contain the time it took to decrypt the message in milliseconds. If permanent should be -1.", "type": "integer" }, "cryptoSDK": { @@ -62,7 +62,7 @@ "type": "boolean" }, "isMatrixDotOrg": { - "description": "true if the current user is using matrix.org", + "description": "true if the current user is using matrix.org.", "type": "boolean" }, "isFederated": { @@ -70,7 +70,7 @@ "type": "boolean" }, "wasVisibleToUser": { - "description": "true if that unable to decrypt error was visible to the user", + "description": "true if that unable to decrypt error was visible to the user.", "type": "boolean" } }, diff --git a/schemas/PollCreation.json b/schemas/PollCreation.json index e3f0318..4a843e1 100644 --- a/schemas/PollCreation.json +++ b/schemas/PollCreation.json @@ -9,8 +9,8 @@ "description": "Whether this poll has been created or edited.", "type": "string", "oneOf": [ - {"const": "Create", "description": "Newly created poll"}, - {"const": "Edit", "description": "Edit of an existing poll"} + {"const": "Create", "description": "Newly created poll."}, + {"const": "Edit", "description": "Edit of an existing poll."} ] }, "isUndisclosed": { diff --git a/schemas/SuperProperties.json b/schemas/SuperProperties.json index 824264c..859b8a8 100644 --- a/schemas/SuperProperties.json +++ b/schemas/SuperProperties.json @@ -15,7 +15,7 @@ "type": "string" }, "appPlatform": { - "description": "Used by web to identify the platform (Web Platform/Electron Platform)", + "description": "Used by web to identify the platform (Web Platform/Electron Platform).", "type": "string" } }, From 1b6eb77e61a23e8594a808e56b407c8c3e844c9d Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 27 Mar 2024 08:33:17 +0100 Subject: [PATCH 2/5] yarn build. --- types/kotlin2/Error.kt | 6 +++--- types/kotlin2/PollCreation.kt | 4 ++-- types/kotlin2/SuperProperties.kt | 3 ++- types/swift/Error.swift | 6 +++--- types/swift/PollCreation.swift | 4 ++-- types/swift/SuperProperties.swift | 2 +- 6 files changed, 13 insertions(+), 12 deletions(-) diff --git a/types/kotlin2/Error.kt b/types/kotlin2/Error.kt index fbc598c..98553b9 100644 --- a/types/kotlin2/Error.kt +++ b/types/kotlin2/Error.kt @@ -49,14 +49,14 @@ data class Error( */ val isFederated: Boolean? = null, /** - * true if the current user is using matrix.org + * true if the current user is using matrix.org. */ val isMatrixDotOrg: Boolean? = null, val name: Name, /** * UTDs can be permanent or temporary. If temporary, this field will * contain the time it took to decrypt the message in milliseconds. If - * permanent should be -1 + * permanent should be -1. */ val timeToDecryptMillis: Int? = null, /** @@ -65,7 +65,7 @@ data class Error( */ val userTrustsOwnIdentity: Boolean? = null, /** - * true if that unable to decrypt error was visible to the user + * true if that unable to decrypt error was visible to the user. */ val wasVisibleToUser: Boolean? = null, ) : VectorAnalyticsEvent { diff --git a/types/kotlin2/PollCreation.kt b/types/kotlin2/PollCreation.kt index ebb7a3e..c9ee1af 100644 --- a/types/kotlin2/PollCreation.kt +++ b/types/kotlin2/PollCreation.kt @@ -41,12 +41,12 @@ data class PollCreation( enum class Action { /** - * Newly created poll + * Newly created poll. */ Create, /** - * Edit of an existing poll + * Edit of an existing poll. */ Edit, } diff --git a/types/kotlin2/SuperProperties.kt b/types/kotlin2/SuperProperties.kt index cd5d9df..4fa8473 100644 --- a/types/kotlin2/SuperProperties.kt +++ b/types/kotlin2/SuperProperties.kt @@ -26,7 +26,8 @@ package im.vector.app.features.analytics.plan */ data class SuperProperties( /** - * Used by web to identify the platform (Web Platform/Electron Platform) + * Used by web to identify the platform (Web Platform/Electron + * Platform). */ val appPlatform: String? = null, /** diff --git a/types/swift/Error.swift b/types/swift/Error.swift index e8c4d16..a0700b8 100644 --- a/types/swift/Error.swift +++ b/types/swift/Error.swift @@ -35,14 +35,14 @@ extension AnalyticsEvent { public let eventLocalAgeMillis: Int? /// true if userDomain != senderDomain. public let isFederated: Bool? - /// true if the current user is using matrix.org + /// true if the current user is using matrix.org. public let isMatrixDotOrg: Bool? public let name: Name - /// UTDs can be permanent or temporary. If temporary, this field will contain the time it took to decrypt the message in milliseconds. If permanent should be -1 + /// UTDs can be permanent or temporary. If temporary, this field will contain the time it took to decrypt the message in milliseconds. If permanent should be -1. public let timeToDecryptMillis: Int? /// true if the current user trusts their own identity (verified session) at time of decryption. public let userTrustsOwnIdentity: Bool? - /// true if that unable to decrypt error was visible to the user + /// true if that unable to decrypt error was visible to the user. public let wasVisibleToUser: Bool? public init(context: String?, cryptoModule: CryptoModule?, cryptoSDK: CryptoSDK?, domain: Domain, eventLocalAgeMillis: Int?, isFederated: Bool?, isMatrixDotOrg: Bool?, name: Name, timeToDecryptMillis: Int?, userTrustsOwnIdentity: Bool?, wasVisibleToUser: Bool?) { diff --git a/types/swift/PollCreation.swift b/types/swift/PollCreation.swift index 1a58bd6..951bd56 100644 --- a/types/swift/PollCreation.swift +++ b/types/swift/PollCreation.swift @@ -38,9 +38,9 @@ extension AnalyticsEvent { } public enum Action: String { - /// Newly created poll + /// Newly created poll. case Create - /// Edit of an existing poll + /// Edit of an existing poll. case Edit } diff --git a/types/swift/SuperProperties.swift b/types/swift/SuperProperties.swift index b611ce1..b861980 100644 --- a/types/swift/SuperProperties.swift +++ b/types/swift/SuperProperties.swift @@ -23,7 +23,7 @@ import Foundation extension AnalyticsEvent { public struct SuperProperties { - /// Used by web to identify the platform (Web Platform/Electron Platform) + /// Used by web to identify the platform (Web Platform/Electron Platform). public let appPlatform: String? /// Which crypto backend is the client currently using. public let cryptoSDK: CryptoSDK? From 5c32a78d15887462a4e148ae03a817e3aa59c403 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 27 Mar 2024 09:13:44 +0100 Subject: [PATCH 3/5] Move file to the kotlin project. --- kotlin/build.gradle | 9 -------- kotlin/lib/build.gradle | 23 +++++++++++++++++++ .../analytics/itf}/VectorAnalyticsEvent.kt | 0 .../analytics/itf}/VectorAnalyticsScreen.kt | 0 .../app/features/analytics/plan}/CallEnded.kt | 0 .../app/features/analytics/plan}/CallError.kt | 0 .../features/analytics/plan}/CallStarted.kt | 0 .../app/features/analytics/plan}/Composer.kt | 0 .../features/analytics/plan}/CreatedRoom.kt | 0 .../app/features/analytics/plan}/Error.kt | 0 .../features/analytics/plan}/Interaction.kt | 0 .../features/analytics/plan}/JoinedRoom.kt | 0 .../features/analytics/plan}/MobileScreen.kt | 0 .../plan}/NotificationTroubleshoot.kt | 0 .../analytics/plan}/PerformanceTimer.kt | 0 .../analytics/plan}/PermissionChanged.kt | 0 .../features/analytics/plan}/PollCreation.kt | 0 .../app/features/analytics/plan}/PollEnd.kt | 0 .../app/features/analytics/plan}/PollVote.kt | 0 .../analytics/plan}/RoomModeration.kt | 0 .../app/features/analytics/plan}/Signup.kt | 0 .../features/analytics/plan}/SlashCommand.kt | 0 .../analytics/plan}/SuperProperties.kt | 0 .../analytics/plan}/UnauthenticatedError.kt | 0 .../analytics/plan}/UserProperties.kt | 0 .../app/features/analytics/plan}/ViewRoom.kt | 0 kotlin/settings.gradle | 2 ++ package.json | 2 +- 28 files changed, 26 insertions(+), 10 deletions(-) create mode 100644 kotlin/lib/build.gradle rename {base_types/kotlin => kotlin/lib/src/main/java/im/vector/app/features/analytics/itf}/VectorAnalyticsEvent.kt (100%) rename {base_types/kotlin => kotlin/lib/src/main/java/im/vector/app/features/analytics/itf}/VectorAnalyticsScreen.kt (100%) rename {types/kotlin2 => kotlin/lib/src/main/java/im/vector/app/features/analytics/plan}/CallEnded.kt (100%) rename {types/kotlin2 => kotlin/lib/src/main/java/im/vector/app/features/analytics/plan}/CallError.kt (100%) rename {types/kotlin2 => kotlin/lib/src/main/java/im/vector/app/features/analytics/plan}/CallStarted.kt (100%) rename {types/kotlin2 => kotlin/lib/src/main/java/im/vector/app/features/analytics/plan}/Composer.kt (100%) rename {types/kotlin2 => kotlin/lib/src/main/java/im/vector/app/features/analytics/plan}/CreatedRoom.kt (100%) rename {types/kotlin2 => kotlin/lib/src/main/java/im/vector/app/features/analytics/plan}/Error.kt (100%) rename {types/kotlin2 => kotlin/lib/src/main/java/im/vector/app/features/analytics/plan}/Interaction.kt (100%) rename {types/kotlin2 => kotlin/lib/src/main/java/im/vector/app/features/analytics/plan}/JoinedRoom.kt (100%) rename {types/kotlin2 => kotlin/lib/src/main/java/im/vector/app/features/analytics/plan}/MobileScreen.kt (100%) rename {types/kotlin2 => kotlin/lib/src/main/java/im/vector/app/features/analytics/plan}/NotificationTroubleshoot.kt (100%) rename {types/kotlin2 => kotlin/lib/src/main/java/im/vector/app/features/analytics/plan}/PerformanceTimer.kt (100%) rename {types/kotlin2 => kotlin/lib/src/main/java/im/vector/app/features/analytics/plan}/PermissionChanged.kt (100%) rename {types/kotlin2 => kotlin/lib/src/main/java/im/vector/app/features/analytics/plan}/PollCreation.kt (100%) rename {types/kotlin2 => kotlin/lib/src/main/java/im/vector/app/features/analytics/plan}/PollEnd.kt (100%) rename {types/kotlin2 => kotlin/lib/src/main/java/im/vector/app/features/analytics/plan}/PollVote.kt (100%) rename {types/kotlin2 => kotlin/lib/src/main/java/im/vector/app/features/analytics/plan}/RoomModeration.kt (100%) rename {types/kotlin2 => kotlin/lib/src/main/java/im/vector/app/features/analytics/plan}/Signup.kt (100%) rename {types/kotlin2 => kotlin/lib/src/main/java/im/vector/app/features/analytics/plan}/SlashCommand.kt (100%) rename {types/kotlin2 => kotlin/lib/src/main/java/im/vector/app/features/analytics/plan}/SuperProperties.kt (100%) rename {types/kotlin2 => kotlin/lib/src/main/java/im/vector/app/features/analytics/plan}/UnauthenticatedError.kt (100%) rename {types/kotlin2 => kotlin/lib/src/main/java/im/vector/app/features/analytics/plan}/UserProperties.kt (100%) rename {types/kotlin2 => kotlin/lib/src/main/java/im/vector/app/features/analytics/plan}/ViewRoom.kt (100%) diff --git a/kotlin/build.gradle b/kotlin/build.gradle index e7d7c7c..070795e 100644 --- a/kotlin/build.gradle +++ b/kotlin/build.gradle @@ -30,15 +30,6 @@ java { } } -sourceSets { - main { - java { - srcDir '../types/kotlin2' - srcDir '../base_types/kotlin' - } - } -} - publishing { publications { mavenJava(MavenPublication) { diff --git a/kotlin/lib/build.gradle b/kotlin/lib/build.gradle new file mode 100644 index 0000000..69debb3 --- /dev/null +++ b/kotlin/lib/build.gradle @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2024 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id 'kotlin' +} + +repositories { + mavenCentral() +} diff --git a/base_types/kotlin/VectorAnalyticsEvent.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/itf/VectorAnalyticsEvent.kt similarity index 100% rename from base_types/kotlin/VectorAnalyticsEvent.kt rename to kotlin/lib/src/main/java/im/vector/app/features/analytics/itf/VectorAnalyticsEvent.kt diff --git a/base_types/kotlin/VectorAnalyticsScreen.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/itf/VectorAnalyticsScreen.kt similarity index 100% rename from base_types/kotlin/VectorAnalyticsScreen.kt rename to kotlin/lib/src/main/java/im/vector/app/features/analytics/itf/VectorAnalyticsScreen.kt diff --git a/types/kotlin2/CallEnded.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/CallEnded.kt similarity index 100% rename from types/kotlin2/CallEnded.kt rename to kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/CallEnded.kt diff --git a/types/kotlin2/CallError.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/CallError.kt similarity index 100% rename from types/kotlin2/CallError.kt rename to kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/CallError.kt diff --git a/types/kotlin2/CallStarted.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/CallStarted.kt similarity index 100% rename from types/kotlin2/CallStarted.kt rename to kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/CallStarted.kt diff --git a/types/kotlin2/Composer.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/Composer.kt similarity index 100% rename from types/kotlin2/Composer.kt rename to kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/Composer.kt diff --git a/types/kotlin2/CreatedRoom.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/CreatedRoom.kt similarity index 100% rename from types/kotlin2/CreatedRoom.kt rename to kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/CreatedRoom.kt diff --git a/types/kotlin2/Error.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/Error.kt similarity index 100% rename from types/kotlin2/Error.kt rename to kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/Error.kt diff --git a/types/kotlin2/Interaction.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/Interaction.kt similarity index 100% rename from types/kotlin2/Interaction.kt rename to kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/Interaction.kt diff --git a/types/kotlin2/JoinedRoom.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/JoinedRoom.kt similarity index 100% rename from types/kotlin2/JoinedRoom.kt rename to kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/JoinedRoom.kt diff --git a/types/kotlin2/MobileScreen.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/MobileScreen.kt similarity index 100% rename from types/kotlin2/MobileScreen.kt rename to kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/MobileScreen.kt diff --git a/types/kotlin2/NotificationTroubleshoot.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/NotificationTroubleshoot.kt similarity index 100% rename from types/kotlin2/NotificationTroubleshoot.kt rename to kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/NotificationTroubleshoot.kt diff --git a/types/kotlin2/PerformanceTimer.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/PerformanceTimer.kt similarity index 100% rename from types/kotlin2/PerformanceTimer.kt rename to kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/PerformanceTimer.kt diff --git a/types/kotlin2/PermissionChanged.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/PermissionChanged.kt similarity index 100% rename from types/kotlin2/PermissionChanged.kt rename to kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/PermissionChanged.kt diff --git a/types/kotlin2/PollCreation.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/PollCreation.kt similarity index 100% rename from types/kotlin2/PollCreation.kt rename to kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/PollCreation.kt diff --git a/types/kotlin2/PollEnd.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/PollEnd.kt similarity index 100% rename from types/kotlin2/PollEnd.kt rename to kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/PollEnd.kt diff --git a/types/kotlin2/PollVote.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/PollVote.kt similarity index 100% rename from types/kotlin2/PollVote.kt rename to kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/PollVote.kt diff --git a/types/kotlin2/RoomModeration.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/RoomModeration.kt similarity index 100% rename from types/kotlin2/RoomModeration.kt rename to kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/RoomModeration.kt diff --git a/types/kotlin2/Signup.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/Signup.kt similarity index 100% rename from types/kotlin2/Signup.kt rename to kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/Signup.kt diff --git a/types/kotlin2/SlashCommand.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/SlashCommand.kt similarity index 100% rename from types/kotlin2/SlashCommand.kt rename to kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/SlashCommand.kt diff --git a/types/kotlin2/SuperProperties.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/SuperProperties.kt similarity index 100% rename from types/kotlin2/SuperProperties.kt rename to kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/SuperProperties.kt diff --git a/types/kotlin2/UnauthenticatedError.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/UnauthenticatedError.kt similarity index 100% rename from types/kotlin2/UnauthenticatedError.kt rename to kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/UnauthenticatedError.kt diff --git a/types/kotlin2/UserProperties.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/UserProperties.kt similarity index 100% rename from types/kotlin2/UserProperties.kt rename to kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/UserProperties.kt diff --git a/types/kotlin2/ViewRoom.kt b/kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/ViewRoom.kt similarity index 100% rename from types/kotlin2/ViewRoom.kt rename to kotlin/lib/src/main/java/im/vector/app/features/analytics/plan/ViewRoom.kt diff --git a/kotlin/settings.gradle b/kotlin/settings.gradle index f074e04..62cc8e5 100644 --- a/kotlin/settings.gradle +++ b/kotlin/settings.gradle @@ -1 +1,3 @@ rootProject.name = 'analytics-events' + +include ':lib' diff --git a/package.json b/package.json index 4ac251a..84a49fa 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "prepublishOnly": "yarn build:ts", "build": "yarn build:ts && yarn build:swift && yarn build:kt2", "build:ts": "./scripts/build-typescript.sh", - "build:kt2": "cd stub-generator && poetry run python -m matrix_analytics_stub_generator -l kotlin -o ../types/kotlin2 -i ../schemas", + "build:kt2": "cd stub-generator && poetry run python -m matrix_analytics_stub_generator -l kotlin -o ../kotlin/lib/src/main/java/im/vector/app/features/analytics/plan -i ../schemas", "build:swift": "cd stub-generator && poetry run python -m matrix_analytics_stub_generator -l swift -o ../types/swift -i ../schemas && cp ../base_types/swift/* ../types/swift/", "build:html": "cd stub-generator && poetry run python -m matrix_analytics_stub_generator -l html -o ../types/html -i ../schemas" } From 826840220669ec4f3ac339453fbd6d820e81f823 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 27 Mar 2024 09:24:08 +0100 Subject: [PATCH 4/5] ignore files generated by Intellij --- .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1062e66..bcb33a5 100644 --- a/.gitignore +++ b/.gitignore @@ -13,5 +13,5 @@ node_modules/ build # File generated by Intellij -/local.properties -/.idea +local.properties +.idea From 89ec5226effb5f98965651063f8553515e91b2f1 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 27 Mar 2024 09:41:25 +0100 Subject: [PATCH 5/5] Configure detekt and cleanup files. --- .github/workflows/kotlin.yml | 2 +- kotlin/build.gradle | 8 -------- kotlin/detekt.yml | 15 +++++++++++++++ kotlin/lib/build.gradle | 6 ++++++ 4 files changed, 22 insertions(+), 9 deletions(-) create mode 100644 kotlin/detekt.yml diff --git a/.github/workflows/kotlin.yml b/.github/workflows/kotlin.yml index d7ef86b..5395cfd 100644 --- a/.github/workflows/kotlin.yml +++ b/.github/workflows/kotlin.yml @@ -25,5 +25,5 @@ jobs: - name: Build for Kotlin uses: gradle/gradle-build-action@v2 with: - arguments: build + arguments: build detekt build-root-directory: kotlin diff --git a/kotlin/build.gradle b/kotlin/build.gradle index 070795e..99d407d 100644 --- a/kotlin/build.gradle +++ b/kotlin/build.gradle @@ -16,7 +16,6 @@ plugins { id "org.jetbrains.kotlin.jvm" version "1.8.20" - id 'java-library' id 'maven-publish' } @@ -24,16 +23,9 @@ repositories { mavenCentral() } -java { - toolchain { - languageVersion = JavaLanguageVersion.of(11) - } -} - publishing { publications { mavenJava(MavenPublication) { - from components.java groupId = 'im.vector.app.features.analytics.plan' artifactId = 'analytics-events' version = '0.5.0' diff --git a/kotlin/detekt.yml b/kotlin/detekt.yml new file mode 100644 index 0000000..a07f616 --- /dev/null +++ b/kotlin/detekt.yml @@ -0,0 +1,15 @@ +# Default rules: https://github.com/detekt/detekt/blob/main/detekt-core/src/main/resources/default-detekt-config.yml + +style: + DataClassContainsFunctions: + active: false + +comments: + EndOfSentenceFormat: + active: true + UndocumentedPublicClass: + active: false + UndocumentedPublicFunction: + active: false + UndocumentedPublicProperty: + active: false diff --git a/kotlin/lib/build.gradle b/kotlin/lib/build.gradle index 69debb3..986dee2 100644 --- a/kotlin/lib/build.gradle +++ b/kotlin/lib/build.gradle @@ -16,8 +16,14 @@ plugins { id 'kotlin' + id "io.gitlab.arturbosch.detekt" version "1.22.0" } repositories { mavenCentral() } + +detekt { + allRules = true + config = files("../detekt.yml") +}