Skip to content

feat!: update all dependencies in project #6

Merged
merged 1 commit into from
Aug 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: '8'
java-version: '11'
distribution: 'adopt'

- name: Gradle wrapper validation
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,24 @@ jobs:
- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: '8'
java-version: '11'
distribution: 'adopt'

- name: Gradle wrapper validation
uses: gradle/wrapper-validation-action@v1

- name: Build with Gradle
run: ./gradlew build

# only for internal usage
- name: Publish RC
run: gradle publish
env:
SONATYPE_NAME: 'Snapshot'
SONATYPE_URI: 'https://oss.sonatype.org/content/repositories/snapshots/'
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
# RELEASE_VERSION: calculate in gradle build script #resolveVersion()

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

## Requirements

1. Project complied with Camunda version 7.14.
2. Spring Boot 2.5.2
3. Kotlin version 1.5
1. Project complied with Camunda version 7.17.
2. Spring Boot 2.6.4
3. Kotlin version 1.7.10

## Installation

Expand Down
37 changes: 21 additions & 16 deletions build-logic/src/main/kotlin/tinkoff-library-conventions.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import java.time.LocalDate
import org.gradle.accessors.dm.LibrariesForLibs


Expand Down Expand Up @@ -44,11 +45,11 @@ artifacts {
tasks {
test {
systemProperty(
"camunda-bpm-process-test-coverage.target-dir-root",
"build/process-test-coverage/"
"camunda-process-test-coverage.target-dir-root",
project.buildDir.resolve("process-test-coverage")
)
useJUnitPlatform {
includeEngines("junit-vintage", "junit-jupiter")
includeEngines("junit-jupiter")
}
}

Expand All @@ -61,16 +62,22 @@ tasks {
)
}
compileKotlin {
kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8.toString()
kotlinOptions.jvmTarget = JavaVersion.VERSION_11.toString()
kotlinOptions.freeCompilerArgs = listOf("-Xjsr305=strict")
}
compileTestKotlin {
kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8.toString()
kotlinOptions.jvmTarget = JavaVersion.VERSION_11.toString()
}

configure<JavaPluginExtension> {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

withType<AbstractPublishToMaven> {
doFirst {
logger.warn("Publish library with version ${project.version}")
}
}
}

Expand Down Expand Up @@ -123,8 +130,8 @@ publishing {
}
repositories {
maven {
name = "OSSRH"
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
name = System.getenv("SONATYPE_NAME") ?: "OSSRH"
url = uri(System.getenv("SONATYPE_URI") ?: "https://oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
Expand All @@ -148,10 +155,9 @@ signing {

// control version of Kotlin
ext["kotlin.version"] = libs.versions.kotlin.get()
ext["kotlin-coroutines.version"] = libs.versions.kotcoroutines.get()

dependencies {
// kotlin
api(libs.kotlin.stdlib)
api(libs.kotlin.reflect)
api(libs.kotlin.logging)

Expand All @@ -164,17 +170,16 @@ dependencies {
testImplementation(libs.mockito.kotlin)
testImplementation(libs.kotest.assertions.core.jvm)
testImplementation(libs.camunda.bpm.assert)
testImplementation(libs.camunda.bpm.mockito)
testImplementation(libs.camunda.bpm.process.test.coverage)
testImplementation(libs.camunda.bpm.junit5)

testImplementation(libs.junit.jupiter.api)
testImplementation(libs.junit.jupiter.params)
testImplementation(libs.junit.vintage.engine)
testImplementation(libs.junit.engine)
}

fun resolveVersion(): String {
return System.getenv("RELEASE_VERSION") ?: when (val githubRunNumber = System.getenv("GITHUB_RUN_NUMBER")) {
null -> "LOCAL"
else -> "GITHUB.${githubRunNumber}-SNAPSHOT"
null -> "LOCAL-${LocalDate.now()}"
else -> "GITHUB-${githubRunNumber}-SNAPSHOT"
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("ktlint:filename")

package ru.tinkoff.top.camunda.delegator.docs.descriptors

import org.springframework.core.annotation.AnnotatedElementUtils
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("ktlint:filename")

package ru.tinkoff.top.camunda.delegator.docs.descriptors

import io.swagger.v3.oas.models.Components
Expand All @@ -20,7 +22,8 @@ fun getSchema(components: Components, methodParameter: MethodParameter): Schema<
}
return SpringDocAnnotationsUtils.resolveSchemaFromType(
methodParameter.parameterType,
components, null,
components,
null,
methodParameter.parameterAnnotations
)
}
Expand All @@ -36,7 +39,8 @@ fun getSchema(components: Components, property: KProperty<*>): Schema<*> {
}
return SpringDocAnnotationsUtils.resolveSchemaFromType(
property.returnType.jvmErasure.java,
components, null,
components,
null,
property.annotations.toTypedArray()
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package ru.tinkoff.top.camunda.delegator.docs.templates

import com.fasterxml.jackson.annotation.JsonInclude
import com.fasterxml.jackson.databind.ObjectMapper
import org.junit.Assert
import org.junit.Test
import io.kotest.matchers.shouldBe
import org.junit.jupiter.api.Test
import org.springframework.core.io.ClassPathResource
import ru.tinkoff.top.camunda.delegator.delegates.DelegateMetaInformation

Expand All @@ -23,7 +23,7 @@ class TestCreatingTemplate {
val templateFile = ClassPathResource("/delegate-templates/demoDelegateTemplate.json")
val template = objectMapper.readTree(templateFile.url)

Assert.assertEquals(template, objectMapper.valueToTree(generatedTemplates))
template shouldBe objectMapper.valueToTree(generatedTemplates)
}

@Test
Expand All @@ -46,7 +46,7 @@ class TestCreatingTemplate {
val templateFile = ClassPathResource("/delegate-templates/demoDelegateTemplateWithoutVisible.json")
val template = objectMapper.readTree(templateFile.url)

Assert.assertEquals(template, objectMapper.valueToTree(generatedTemplates))
template shouldBe objectMapper.valueToTree(generatedTemplates)
}

@Test
Expand Down Expand Up @@ -81,6 +81,6 @@ class TestCreatingTemplate {
val templateFile = ClassPathResource("/delegate-templates/templateWithChoices.json")
val template = objectMapper.readTree(templateFile.url)

Assert.assertEquals(template, objectMapper.valueToTree(generatedTemplates))
template shouldBe objectMapper.valueToTree(generatedTemplates)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import ru.tinkoff.top.camunda.delegator.delegates.executors.DelegateExecutorImpl
class DelegateMethodHandlerMockRegisterTest {

private val register = DelegateMethodHandlerMockRegister(
listOf(), DelegateExecutorImpl()
listOf(),
DelegateExecutorImpl()
)

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@ package ru.tinkoff.top.camunda.delegator.test
import org.camunda.bpm.engine.runtime.ProcessInstance
import org.camunda.bpm.engine.test.Deployment
import org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.assertThat
import org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.runtimeService
import org.camunda.bpm.extension.process_test_coverage.junit.rules.ProcessCoverageInMemProcessEngineConfiguration
import org.camunda.bpm.extension.process_test_coverage.junit.rules.TestCoverageProcessEngineRule
import org.camunda.bpm.extension.process_test_coverage.junit.rules.TestCoverageProcessEngineRuleBuilder
import org.junit.Before
import org.junit.ClassRule
import org.junit.Rule
import org.junit.Test
import org.camunda.community.process_test_coverage.engine.platform7.ProcessCoverageInMemProcessEngineConfiguration
import org.camunda.community.process_test_coverage.junit5.platform7.ProcessEngineCoverageExtension
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.RegisterExtension
import ru.tinkoff.top.camunda.delegator.delegates.executors.DelegateExecutorImpl
import ru.tinkoff.top.camunda.delegator.delegates.executors.interceptors.ResolveArgumentsInterceptor
import ru.tinkoff.top.camunda.delegator.delegates.executors.interceptors.output.single.SingleResultExecutionWriter
Expand All @@ -33,15 +30,15 @@ class DemoProcessTest {
it.bpmnParseFactory = DefaultDelegatorBpmnParseFactory()
}

@Rule
@ClassRule
@JvmField
val processEngineRule: TestCoverageProcessEngineRule = TestCoverageProcessEngineRuleBuilder
.create(camundaConfiguration.buildProcessEngine())
@RegisterExtension
var coverageExtension: ProcessEngineCoverageExtension = ProcessEngineCoverageExtension
.builder(camundaConfiguration)
.assertClassCoverageAtLeast(0.5)
.build()
}

@Before
@BeforeEach
fun init() {
delegateMethodHandlerRegister.initDelegates(listOf(DemoDelegate()))
}
Expand All @@ -60,7 +57,7 @@ class DemoProcessTest {
private fun runProcess(
processName: String,
variables: Map<String, Any?> = emptyMap()
): ProcessInstance = runtimeService().startProcessInstanceByKey(
): ProcessInstance = coverageExtension.processEngine.runtimeService.startProcessInstanceByKey(
processName,
processName,
variables
Expand Down
19 changes: 1 addition & 18 deletions camunda-delegator/api/camunda-delegator.api
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,6 @@ public abstract interface annotation class ru/tinkoff/top/camunda/delegator/anno
public abstract fun name ()Ljava/lang/String;
}

public final class ru/tinkoff/top/camunda/delegator/config/BpmnParserCamundaPlugin : org/camunda/bpm/engine/impl/cfg/ProcessEnginePlugin {
public static final field Companion Lru/tinkoff/top/camunda/delegator/config/BpmnParserCamundaPlugin$Companion;
public fun <init> (Lorg/camunda/bpm/engine/impl/el/ExpressionManager;Lorg/camunda/bpm/engine/impl/cfg/BpmnParseFactory;)V
public fun postInit (Lorg/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl;)V
public fun postProcessEngineBuild (Lorg/camunda/bpm/engine/ProcessEngine;)V
public fun preInit (Lorg/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl;)V
}

public final class ru/tinkoff/top/camunda/delegator/config/BpmnParserCamundaPlugin$Companion : mu/KLogging {
}

public final class ru/tinkoff/top/camunda/delegator/config/DelegatorBpmnParserCamundaPlugin : org/camunda/bpm/engine/impl/cfg/ProcessEnginePlugin {
public static final field Companion Lru/tinkoff/top/camunda/delegator/config/DelegatorBpmnParserCamundaPlugin$Companion;
public fun <init> (Lorg/camunda/bpm/engine/impl/el/ExpressionManager;Lorg/camunda/bpm/engine/impl/cfg/BpmnParseFactory;)V
Expand All @@ -38,12 +27,6 @@ public final class ru/tinkoff/top/camunda/delegator/config/DelegatorBpmnParserCa
public final class ru/tinkoff/top/camunda/delegator/config/DelegatorBpmnParserCamundaPlugin$Companion : mu/KLogging {
}

public class ru/tinkoff/top/camunda/delegator/config/SpringProcessEngineBpmnParseConfiguration : org/camunda/bpm/engine/spring/SpringProcessEngineConfiguration {
public fun <init> ()V
public fun getBpmnParseFactory ()Lorg/camunda/bpm/engine/impl/cfg/BpmnParseFactory;
public fun setBpmnParseFactory (Lorg/camunda/bpm/engine/impl/cfg/BpmnParseFactory;)Lorg/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl;
}

public final class ru/tinkoff/top/camunda/delegator/delegates/DelegateException : java/lang/RuntimeException {
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
public final fun getDelegateActivityId ()Ljava/lang/String;
Expand Down Expand Up @@ -454,7 +437,7 @@ public final class ru/tinkoff/top/camunda/delegator/parser/DefaultDelegatorBpmnP
public class ru/tinkoff/top/camunda/delegator/parser/DelegatorCamundaBpmnParse : org/camunda/bpm/engine/impl/bpmn/parser/BpmnParse {
public fun <init> (Lorg/camunda/bpm/engine/impl/bpmn/parser/BpmnParser;)V
public fun parseExecutionListener (Lorg/camunda/bpm/engine/impl/util/xml/Element;Ljava/lang/String;)Lorg/camunda/bpm/engine/delegate/ExecutionListener;
public fun parseServiceTaskLike (Ljava/lang/String;Lorg/camunda/bpm/engine/impl/util/xml/Element;Lorg/camunda/bpm/engine/impl/pvm/process/ScopeImpl;)Lorg/camunda/bpm/engine/impl/pvm/process/ActivityImpl;
public fun parseServiceTaskLike (Lorg/camunda/bpm/engine/impl/pvm/process/ActivityImpl;Ljava/lang/String;Lorg/camunda/bpm/engine/impl/util/xml/Element;Lorg/camunda/bpm/engine/impl/util/xml/Element;Lorg/camunda/bpm/engine/impl/pvm/process/ScopeImpl;)V
}

public final class ru/tinkoff/top/camunda/delegator/servicetask/CustomClassDelegateActivityBehavior : org/camunda/bpm/engine/impl/bpmn/behavior/ClassDelegateActivityBehavior {
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ class MultipleResultExecutionWriter : DelegateInterceptor() {
}
}

@Suppress("ReturnCount")
private fun delegateSupportedMultipleResult(
delegateMethod: Method
): Boolean {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("ktlint:filename")

package ru.tinkoff.top.camunda.delegator.delegates.resolvers

import org.springframework.core.MethodParameter
Expand Down