From 2d5baaeda11130db01ff27a65b072f6a5896a690 Mon Sep 17 00:00:00 2001 From: Vladimir Orany Date: Wed, 17 Feb 2021 01:45:27 +0100 Subject: [PATCH 1/2] using Kordamp --- .github/workflows/gradle.yml | 53 +++-- build.gradle | 221 +++++++++++------- gradle.properties | 5 + gradle/LICENSE_HEADER | 15 ++ gradle/wrapper/gradle-wrapper.properties | 2 +- libs/micronaut-segment/build.gradle | 40 ++++ .../micronaut-segment/micronaut-cli.yml | 0 .../segment/DefaultSegmentService.groovy | 17 ++ .../micronaut/segment/NoOpSegmentService.java | 17 ++ .../segment/SegmentConfiguration.java | 17 ++ .../micronaut/segment/SegmentFactory.java | 17 ++ .../micronaut/segment/SegmentService.java | 17 ++ .../src}/main/resources/application.yml | 0 .../src/main/resources/logback.xml | 35 +++ .../segment/SegmentServiceSpec.groovy | 17 ++ settings.gradle | 24 ++ src/main/resources/logback.xml | 16 -- 17 files changed, 398 insertions(+), 115 deletions(-) create mode 100644 gradle/LICENSE_HEADER create mode 100644 libs/micronaut-segment/build.gradle rename micronaut-cli.yml => libs/micronaut-segment/micronaut-cli.yml (100%) rename {src => libs/micronaut-segment/src}/main/groovy/com/agorapulse/micronaut/segment/DefaultSegmentService.groovy (94%) rename {src => libs/micronaut-segment/src}/main/groovy/com/agorapulse/micronaut/segment/NoOpSegmentService.java (63%) rename {src => libs/micronaut-segment/src}/main/groovy/com/agorapulse/micronaut/segment/SegmentConfiguration.java (56%) rename {src => libs/micronaut-segment/src}/main/groovy/com/agorapulse/micronaut/segment/SegmentFactory.java (65%) rename {src => libs/micronaut-segment/src}/main/groovy/com/agorapulse/micronaut/segment/SegmentService.java (95%) rename {src => libs/micronaut-segment/src}/main/resources/application.yml (100%) create mode 100644 libs/micronaut-segment/src/main/resources/logback.xml rename {src => libs/micronaut-segment/src}/test/groovy/com/agorapulse/micronaut/segment/SegmentServiceSpec.groovy (57%) create mode 100644 settings.gradle delete mode 100644 src/main/resources/logback.xml diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index df5ce65..5737036 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -1,3 +1,21 @@ +# +# SPDX-License-Identifier: Apache-2.0 +# +# Copyright 2020-2021 Agorapulse. +# +# 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 +# +# https://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. +# + name: Check on: [push, pull_request] @@ -8,21 +26,28 @@ jobs: env: GRADLE_OPTS: "-Xmx6g -Xms4g" CI: true + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v1 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 - - uses: actions/cache@v1 - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/gradle.properties') }} - restore-keys: | - ${{ runner.os }}-gradle- - - uses: eskatos/gradle-command-action@v1 - with: - arguments: check --stacktrace + - uses: actions/cache@v1 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/gradle.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - uses: eskatos/gradle-command-action@v1 + with: + arguments: check coveralls --stacktrace + - name: Show Reports + uses: actions/upload-artifact@v1 + if: failure() + with: + name: reports + path: build/reports/ diff --git a/build.gradle b/build.gradle index 12ec031..67959ed 100644 --- a/build.gradle +++ b/build.gradle @@ -1,110 +1,163 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * Copyright 2020-2021 Agorapulse. + * + * 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 + * + * https://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 "io.spring.dependency-management" version "1.0.6.RELEASE" - id "groovy" - id "maven" - id "jacoco" - id "checkstyle" - id "codenarc" - id 'com.github.kt3k.coveralls' version '2.8.4' - id "maven-publish" - id "com.jfrog.bintray" version "1.8.4" + id 'org.kordamp.gradle.groovy-project' + id 'org.kordamp.gradle.bintray' + id 'org.kordamp.gradle.checkstyle' + id 'org.kordamp.gradle.codenarc' + id 'org.kordamp.gradle.coveralls' } -repositories { - mavenLocal() - mavenCentral() - maven { url "https://jcenter.bintray.com" } -} +if (!project.hasProperty('bintrayUsername')) ext.bintrayUsername = '**UNDEFINED**' +if (!project.hasProperty('bintrayApiKey')) ext.bintrayApiKey = '**UNDEFINED**' + +config { + release = (rootProject.findProperty('release') ?: false).toBoolean() + + info { + name = 'Micronaut Segment' + vendor = 'Agorapulse' + description = 'Micronaut integration for Segment' -dependencyManagement { - imports { - mavenBom 'io.micronaut:micronaut-bom:1.2.10' + links { + website = "https://github.com/" + slug + issueTracker = "https://github.com/" + slug + "/issues" + scm = "https://github.com/" + slug + ".git" + } + + people { + person { + id = 'musketyr' + name = 'Vladimir Orany' + roles = ['developer'] + } + } + + repositories { + repository { + name = 'localRelease' + url = "" + project.rootProject.buildDir + "/repos/local/release" + } + repository { + name = 'localSnapshot' + url = "" + project.rootProject.buildDir + "/repos/local/snapshot" + } + } } -} -dependencies { - annotationProcessor "io.micronaut:micronaut-inject-java" + licensing { + licenses { + license { + id = 'Apache-2.0' + } + } + } - compile "io.micronaut:micronaut-runtime-groovy" - compile "io.micronaut:micronaut-validation" - compile "com.segment.analytics.java:analytics:2.1.1" + publishing { + signing = false + releasesRepository = 'localRelease' + snapshotsRepository = 'localSnapshot' + } - compileOnly "io.micronaut:micronaut-inject-groovy" + bintray { + credentials { + username = bintrayUsername + password = bintrayApiKey + } + // TODO: replace + userOrg = 'agorapulse' + repo = 'libs' + name = 'micronaut-segment' + publish = true + } - runtime "ch.qos.logback:logback-classic:1.2.3" + quality { + checkstyle { + toolVersion = '8.27' + } - testCompile("org.spockframework:spock-core") { - exclude group: "org.codehaus.groovy", module: "groovy-all" + codenarc { + toolVersion = '1.5' + } } - testCompile "io.micronaut.test:micronaut-test-spock:1.1.0" - testCompile "io.micronaut:micronaut-inject-groovy" - testCompile 'net.bytebuddy:byte-buddy:1.10.1' - testCompile 'org.objenesis:objenesis:3.0.1' -} -tasks.withType(GroovyCompile) { - groovyOptions.forkOptions.jvmArgs.add('-Dgroovy.parameters=true') -} + coverage { + coveralls { + enabled = true + } + } -checkstyle { - toolVersion = '8.23' -} + docs { + groovydoc { + aggregate { + enabled = false + } + } + } -codenarc { - toolVersion = '1.4' } -// publishing -task sourcesJar(type: Jar, dependsOn: classes) { - classifier = 'sources' - from sourceSets.main.allSource -} +allprojects { + repositories { + jcenter() + mavenCentral() + maven { url "https://dl.bintray.com/agorapulse/libs" } + maven { url "https://repo.spring.io/release" } + } -task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' - from javadoc.destinationDir + license { + exclude '**/*.json' + exclude '***.yml' + } } -artifacts { - archives sourcesJar, javadocJar -} +subprojects { subproject -> + if (subproject.name == 'guide') return -publishing { - publications { - groovyMaven(MavenPublication) { - from components.java + apply plugin: 'groovy' - artifact sourcesJar { - classifier "sources" - } + dependencies { + // add your global dependencies + } - artifact javadocJar { - classifier "javadoc" - } - } + // useful for Micronaut + tasks.withType(GroovyCompile) { + groovyOptions.forkOptions.jvmArgs.add('-Dgroovy.parameters=true') + } + + // useful for Micronaut + tasks.withType(JavaCompile){ + options.encoding = "UTF-8" + options.compilerArgs.add('-parameters') + } + + // location independent tests (useful for stable CI builds) + tasks.withType(Test){ + systemProperty 'user.timezone', 'UTC' + systemProperty 'user.language', 'en' } -} -// set bintrayUser & bintrayKey in gradle.properties -bintray { - user = System.getenv('BINTRAY_USER') - key = System.getenv('BINTRAY_KEY') - publications = ['groovyMaven'] - publish = true - - final String projectName = project.name - final String projectDescription = project.description - - pkg { - websiteUrl = 'https://github.com/agorapulse/micronaut-segmen' - issueTrackerUrl = 'https://github.com/agorapulse/micronaut-segment/issues' - vcsUrl = 'https://github.com/agorapulse/micronaut-segment.git' - - repo = 'libs' // or your repo name - userOrg = 'agorapulse' - name = projectName // somehow project.* doesn't work in this closure - desc = projectDescription - licenses = ['Apache-2.0'] + // useful for IntelliJ + task cleanOut(type: Delete) { + delete file('out') } - // dryRun = true // whether to run this as dry-run, without deploying + + clean.dependsOn cleanOut } + +check.dependsOn('aggregateCheckstyle', 'aggregateCodenarc', 'aggregateAllTestReports', 'coveralls') diff --git a/gradle.properties b/gradle.properties index 272fde3..37b112f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,7 @@ group = com.agorapulse version = 0.2.0-SNAPSHOT + +slug = agorapulse/micronaut-segment + +kordampPluginVersion=0.43.0 +micronautVersion = 1.2.8 \ No newline at end of file diff --git a/gradle/LICENSE_HEADER b/gradle/LICENSE_HEADER new file mode 100644 index 0000000..2544f37 --- /dev/null +++ b/gradle/LICENSE_HEADER @@ -0,0 +1,15 @@ +SPDX-License-Identifier: Apache-2.0 + +Copyright 2020-${copyrightYear} Agorapulse. + +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 + + https://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. diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 17bf113..443b271 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-all.zip diff --git a/libs/micronaut-segment/build.gradle b/libs/micronaut-segment/build.gradle new file mode 100644 index 0000000..9d8cb6e --- /dev/null +++ b/libs/micronaut-segment/build.gradle @@ -0,0 +1,40 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * Copyright 2020-2021 Agorapulse. + * + * 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 + * + * https://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. + */ +dependencies { + annotationProcessor platform("io.micronaut:micronaut-bom:$micronautVersion") + annotationProcessor "io.micronaut:micronaut-inject-java" + + compile platform("io.micronaut:micronaut-bom:$micronautVersion") + compile "io.micronaut:micronaut-runtime-groovy" + compile "io.micronaut:micronaut-validation" + compile "com.segment.analytics.java:analytics:2.1.1" + + compileOnly "io.micronaut:micronaut-inject-groovy" + + runtime "ch.qos.logback:logback-classic:1.2.3" + + + testCompile platform("io.micronaut:micronaut-bom:$micronautVersion") + testCompile("org.spockframework:spock-core") { + exclude group: "org.codehaus.groovy", module: "groovy-all" + } + testCompile "io.micronaut.test:micronaut-test-spock:1.1.0" + testCompile "io.micronaut:micronaut-inject-groovy" + testCompile 'net.bytebuddy:byte-buddy:1.10.1' + testCompile 'org.objenesis:objenesis:3.0.1' +} \ No newline at end of file diff --git a/micronaut-cli.yml b/libs/micronaut-segment/micronaut-cli.yml similarity index 100% rename from micronaut-cli.yml rename to libs/micronaut-segment/micronaut-cli.yml diff --git a/src/main/groovy/com/agorapulse/micronaut/segment/DefaultSegmentService.groovy b/libs/micronaut-segment/src/main/groovy/com/agorapulse/micronaut/segment/DefaultSegmentService.groovy similarity index 94% rename from src/main/groovy/com/agorapulse/micronaut/segment/DefaultSegmentService.groovy rename to libs/micronaut-segment/src/main/groovy/com/agorapulse/micronaut/segment/DefaultSegmentService.groovy index 3008082..51585fd 100644 --- a/src/main/groovy/com/agorapulse/micronaut/segment/DefaultSegmentService.groovy +++ b/libs/micronaut-segment/src/main/groovy/com/agorapulse/micronaut/segment/DefaultSegmentService.groovy @@ -1,3 +1,20 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * Copyright 2020-2021 Agorapulse. + * + * 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 + * + * https://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. + */ package com.agorapulse.micronaut.segment import com.segment.analytics.Analytics diff --git a/src/main/groovy/com/agorapulse/micronaut/segment/NoOpSegmentService.java b/libs/micronaut-segment/src/main/groovy/com/agorapulse/micronaut/segment/NoOpSegmentService.java similarity index 63% rename from src/main/groovy/com/agorapulse/micronaut/segment/NoOpSegmentService.java rename to libs/micronaut-segment/src/main/groovy/com/agorapulse/micronaut/segment/NoOpSegmentService.java index 6a2598a..90b4043 100644 --- a/src/main/groovy/com/agorapulse/micronaut/segment/NoOpSegmentService.java +++ b/libs/micronaut-segment/src/main/groovy/com/agorapulse/micronaut/segment/NoOpSegmentService.java @@ -1,3 +1,20 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * Copyright 2020-2021 Agorapulse. + * + * 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 + * + * https://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. + */ package com.agorapulse.micronaut.segment; import java.util.Date; diff --git a/src/main/groovy/com/agorapulse/micronaut/segment/SegmentConfiguration.java b/libs/micronaut-segment/src/main/groovy/com/agorapulse/micronaut/segment/SegmentConfiguration.java similarity index 56% rename from src/main/groovy/com/agorapulse/micronaut/segment/SegmentConfiguration.java rename to libs/micronaut-segment/src/main/groovy/com/agorapulse/micronaut/segment/SegmentConfiguration.java index e25bd42..9eaba9c 100644 --- a/src/main/groovy/com/agorapulse/micronaut/segment/SegmentConfiguration.java +++ b/libs/micronaut-segment/src/main/groovy/com/agorapulse/micronaut/segment/SegmentConfiguration.java @@ -1,3 +1,20 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * Copyright 2020-2021 Agorapulse. + * + * 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 + * + * https://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. + */ package com.agorapulse.micronaut.segment; import io.micronaut.context.annotation.ConfigurationProperties; diff --git a/src/main/groovy/com/agorapulse/micronaut/segment/SegmentFactory.java b/libs/micronaut-segment/src/main/groovy/com/agorapulse/micronaut/segment/SegmentFactory.java similarity index 65% rename from src/main/groovy/com/agorapulse/micronaut/segment/SegmentFactory.java rename to libs/micronaut-segment/src/main/groovy/com/agorapulse/micronaut/segment/SegmentFactory.java index 7160218..063cd7a 100644 --- a/src/main/groovy/com/agorapulse/micronaut/segment/SegmentFactory.java +++ b/libs/micronaut-segment/src/main/groovy/com/agorapulse/micronaut/segment/SegmentFactory.java @@ -1,3 +1,20 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * Copyright 2020-2021 Agorapulse. + * + * 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 + * + * https://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. + */ package com.agorapulse.micronaut.segment; import com.segment.analytics.Analytics; diff --git a/src/main/groovy/com/agorapulse/micronaut/segment/SegmentService.java b/libs/micronaut-segment/src/main/groovy/com/agorapulse/micronaut/segment/SegmentService.java similarity index 95% rename from src/main/groovy/com/agorapulse/micronaut/segment/SegmentService.java rename to libs/micronaut-segment/src/main/groovy/com/agorapulse/micronaut/segment/SegmentService.java index 90851b2..d440516 100644 --- a/src/main/groovy/com/agorapulse/micronaut/segment/SegmentService.java +++ b/libs/micronaut-segment/src/main/groovy/com/agorapulse/micronaut/segment/SegmentService.java @@ -1,3 +1,20 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * Copyright 2020-2021 Agorapulse. + * + * 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 + * + * https://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. + */ package com.agorapulse.micronaut.segment; import java.util.Collections; diff --git a/src/main/resources/application.yml b/libs/micronaut-segment/src/main/resources/application.yml similarity index 100% rename from src/main/resources/application.yml rename to libs/micronaut-segment/src/main/resources/application.yml diff --git a/libs/micronaut-segment/src/main/resources/logback.xml b/libs/micronaut-segment/src/main/resources/logback.xml new file mode 100644 index 0000000..cff0d9f --- /dev/null +++ b/libs/micronaut-segment/src/main/resources/logback.xml @@ -0,0 +1,35 @@ + + + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + + diff --git a/src/test/groovy/com/agorapulse/micronaut/segment/SegmentServiceSpec.groovy b/libs/micronaut-segment/src/test/groovy/com/agorapulse/micronaut/segment/SegmentServiceSpec.groovy similarity index 57% rename from src/test/groovy/com/agorapulse/micronaut/segment/SegmentServiceSpec.groovy rename to libs/micronaut-segment/src/test/groovy/com/agorapulse/micronaut/segment/SegmentServiceSpec.groovy index ef43940..e1fb9f1 100644 --- a/src/test/groovy/com/agorapulse/micronaut/segment/SegmentServiceSpec.groovy +++ b/libs/micronaut-segment/src/test/groovy/com/agorapulse/micronaut/segment/SegmentServiceSpec.groovy @@ -1,3 +1,20 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * Copyright 2020-2021 Agorapulse. + * + * 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 + * + * https://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. + */ package com.agorapulse.micronaut.segment import com.segment.analytics.Analytics diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..9eb141b --- /dev/null +++ b/settings.gradle @@ -0,0 +1,24 @@ +pluginManagement { + repositories { + jcenter() + gradlePluginPortal() + } + plugins { + id 'org.kordamp.gradle.settings' version kordampPluginVersion + id 'org.kordamp.gradle.groovy-project' version kordampPluginVersion + id 'org.kordamp.gradle.bintray' version kordampPluginVersion + id 'org.kordamp.gradle.checkstyle' version kordampPluginVersion + id 'org.kordamp.gradle.codenarc' version kordampPluginVersion + id 'org.kordamp.gradle.coveralls' version kordampPluginVersion + } +} + +plugins { + id 'org.kordamp.gradle.settings' +} + +projects { + directories = ['libs'] +} + +rootProject.name = 'micronaut-segment-root' diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml deleted file mode 100644 index 9bba277..0000000 --- a/src/main/resources/logback.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - - From 1402f37218db6d044bf04e06f212681241a0f138 Mon Sep 17 00:00:00 2001 From: Vladimir Orany Date: Wed, 17 Feb 2021 01:50:06 +0100 Subject: [PATCH 2/2] fixed style violations --- .../agorapulse/micronaut/segment/DefaultSegmentService.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/micronaut-segment/src/main/groovy/com/agorapulse/micronaut/segment/DefaultSegmentService.groovy b/libs/micronaut-segment/src/main/groovy/com/agorapulse/micronaut/segment/DefaultSegmentService.groovy index 51585fd..95117c5 100644 --- a/libs/micronaut-segment/src/main/groovy/com/agorapulse/micronaut/segment/DefaultSegmentService.groovy +++ b/libs/micronaut-segment/src/main/groovy/com/agorapulse/micronaut/segment/DefaultSegmentService.groovy @@ -234,7 +234,7 @@ class DefaultSegmentService implements SegmentService { // PRIVATE private static Map safe(Map original) { - return original.findAll { it.value } + return original.findAll { Map.Entry e -> e.value } } private static MessageBuilder addOptions(MessageBuilder builder, Map options, Date timestamp = null) { @@ -266,7 +266,7 @@ class DefaultSegmentService implements SegmentService { } builder.context(context) } - builder + return builder } }