diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a508772..e89896f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,11 +18,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - - name: Set up JDK 11 + - name: Set up JDK 21 uses: actions/setup-java@v2 with: distribution: 'adopt' - java-version: '11' + java-version: '21' - name: Grant execute permission for gradlew run: chmod +x gradlew diff --git a/.github/workflows/manually-release.yml b/.github/workflows/manually-release.yml index 9850dcd..862fba1 100644 --- a/.github/workflows/manually-release.yml +++ b/.github/workflows/manually-release.yml @@ -26,11 +26,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - - name: Set up JDK 11 + - name: Set up JDK 21 uses: actions/setup-java@v2 with: distribution: 'adopt' - java-version: '11' + java-version: '21' - name: Grant execute permission for gradlew run: chmod +x gradlew diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 519f7fd..9ad35cd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,11 +21,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - - name: Set up JDK 11 + - name: Set up JDK 21 uses: actions/setup-java@v2 with: distribution: 'adopt' - java-version: '11' + java-version: '21' - name: Grant execute permission for gradlew run: chmod +x gradlew diff --git a/build.gradle b/build.gradle index 4783b91..1076b63 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,8 @@ -import com.github.spotbugs.SpotBugsTask - plugins { - id "io.spring.dependency-management" version "1.0.9.RELEASE" + id "io.spring.dependency-management" version "1.1.4" id 'java' id 'jacoco' - id "com.github.spotbugs" version "3.0.0" id "com.github.node-gradle.node" version "2.2.1" - id 'nu.studer.jooq' version '3.0.3' } apply from: 'project-properties.gradle' @@ -14,7 +10,6 @@ apply from: 'project-properties.gradle' def scriptsUrl = 'https://raw.githubusercontent.com/reportportal/gradle-scripts/' + (releaseMode ? getProperty('scripts.version') : 'develop') -apply from: 'jooq.gradle' apply from: 'ui.gradle' apply from: scriptsUrl + '/release-fat.gradle' apply from: scriptsUrl + '/signing.gradle' @@ -35,47 +30,29 @@ dependencyManagement { } dependencies { + // ALL new dependencies should be included in shadowJar plugin! + // transitive dependencies may be required as well. could be checked in runtime only! if (releaseMode) { implementation 'com.epam.reportportal:commons-dao' implementation 'com.epam.reportportal:plugin-api' annotationProcessor 'com.epam.reportportal:plugin-api' } else { - implementation 'com.github.reportportal:commons-dao:acf1ec7' - implementation 'com.github.reportportal:plugin-api:188792e' - annotationProcessor 'com.github.reportportal:plugin-api:188792e' + implementation 'com.github.reportportal:commons-dao:8dcc514' + implementation 'com.github.reportportal:plugin-api:815c74a' + annotationProcessor 'com.github.reportportal:plugin-api:815c74a' } - implementation 'org.hibernate:hibernate-core:5.6.15.Final' - - implementation group: 'javax.servlet', name: 'javax.servlet-api', version: '4.0.1' - implementation group: 'org.jooq', name: 'jooq', version: '3.14.4' - jooqRuntime 'org.postgresql:postgresql:42.7.3' - - compile 'ch.qos.logback:logback-classic:1.2.3' - compile 'org.slf4j:slf4j-api:1.7.25' - - compile 'io.atlassian.fugue:fugue:4.7.2' - compile 'com.atlassian.jira:jira-rest-java-client-core:5.2.1' - testImplementation('org.junit.jupiter:junit-jupiter:5.6.0') + implementation("com.atlassian.jira:jira-rest-java-client-core:6.0.1") + implementation "io.atlassian.fugue:fugue:6.0.1" -} - -spotbugs { - sourceSets = [sourceSets.main] - reportLevel = "high" -} -tasks.withType(SpotBugsTask) { - reports { - xml.enabled false - html.enabled true - } + testImplementation('org.junit.jupiter:junit-jupiter:5.11.0') } test { useJUnitPlatform() jacocoTestReport { reports { - xml.enabled true + xml.required = true } } } @@ -106,7 +83,7 @@ jar { } manifest { attributes( - "Class-Path": configurations.compile.collect { it.getName() }.join(' '), + "Class-Path": configurations.compileClasspath.collect { it.getName() }.join(' '), "Plugin-Id": "${pluginId}", "Plugin-Version": "${project.version}", "Plugin-Provider": "Report Portal", @@ -124,17 +101,31 @@ shadowJar { from("ui/build") { into("/resources") } - configurations = [project.configurations.compile] + configurations = [project.configurations.compileClasspath] zip64 true dependencies { - exclude(dependency('com.github.reportportal:')) - exclude(dependency('com.epam.reportportal:')) - exclude(dependency('org.springframework:')) - exclude(dependency('org.springframework.security:')) - exclude(dependency('org.springframework.data:')) - exclude(dependency('org.springframework.boot:')) - exclude(dependency('ch.qos.logback:')) - exclude(dependency('org.slf4j:')) + include(dependency("com.atlassian.jira:jira-rest-java-client-api:.*")) + include(dependency("com.atlassian.jira:jira-rest-java-client-core:.*")) + include(dependency("com.atlassian.httpclient:atlassian-httpclient-api:.*")) + include(dependency("com.atlassian.httpclient:atlassian-httpclient-library:.*")) + include(dependency("com.atlassian.sal:sal-api:.*")) + include(dependency("com.atlassian.event:atlassian-event:.*")) + include(dependency("io.atlassian.util.concurrent:atlassian-util-concurrent:.*")) + include(dependency("io.atlassian.fugue:fugue:.*")) + include(dependency("org.apache.httpcomponents:httpasyncclient:.*")) + include(dependency("org.apache.httpcomponents:httpasyncclient-cache:.*")) + include(dependency("org.apache.httpcomponents:httpclient:.*")) + include(dependency("org.apache.httpcomponents:httpclient-cache:.*")) + include(dependency("org.apache.httpcomponents:httpcore:.*")) + include(dependency("org.apache.httpcomponents:httpcore-nio:.*")) + include(dependency("org.apache.httpcomponents:httpcore-mime:.*")) + include(dependency("org.glassfish.jersey.core:jersey-server:.*")) + include(dependency("org.glassfish.jersey.core:jersey-common:.*")) + include(dependency("jakarta.ws.rs:jakarta.ws.rs-api:.*")) + include(dependency("jakarta.annotation:jakarta.annotation-api:.*")) + include(dependency("org.glassfish.hk2.external:jakarta.inject:.*")) + include(dependency("org.glassfish.hk2:osgi-resource-locator:.*")) + include(dependency("org.glassfish.jaxb:jaxb-runtime:.*")) } } @@ -144,9 +135,9 @@ task plugin(type: Jar) { with jar } into('lib') { - from configurations.compile + from configurations.compileClasspath } - extension('zip') + archiveExtension.set('zip') } task assemblePlugin(type: Copy) { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index cc4fdc2..a4b76b9 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 c4520c4..df97d72 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ -#Fri Mar 13 14:15:13 MSK 2020 -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/jooq.gradle b/jooq.gradle index 0f38b27..accb253 100644 --- a/jooq.gradle +++ b/jooq.gradle @@ -1,7 +1,5 @@ jooq { - version = '3.12.4' - edition = 'OSS' - sample(sourceSets.main) { + configuration { jdbc { driver = 'org.postgresql.Driver' url = 'jdbc:postgresql://localhost:5432/reportportal' @@ -33,8 +31,4 @@ jooq { } } } -} - -generateSampleJooqSchemaSource { - enabled = false } \ No newline at end of file diff --git a/project-properties.gradle b/project-properties.gradle index 4a68d7f..7d7763d 100755 --- a/project-properties.gradle +++ b/project-properties.gradle @@ -1,5 +1,7 @@ -sourceCompatibility = JavaVersion.VERSION_11 -targetCompatibility = JavaVersion.VERSION_11 +java { + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 +} project.ext { publishRepo = "https://maven.pkg.github.com/reportportal/plugin-bts-jira-cloud" @@ -7,7 +9,3 @@ project.ext { releaseMode = project.hasProperty("releaseMode") pluginsDir = "$buildDir/plugins" } - -wrapper { - gradleVersion = '5.4.1' -} diff --git a/src/main/java/com/epam/reportportal/extension/jira/CloudJiraExtension.java b/src/main/java/com/epam/reportportal/extension/jira/CloudJiraExtension.java index b7051e5..d49fb80 100644 --- a/src/main/java/com/epam/reportportal/extension/jira/CloudJiraExtension.java +++ b/src/main/java/com/epam/reportportal/extension/jira/CloudJiraExtension.java @@ -29,9 +29,9 @@ import com.epam.reportportal.extension.jira.command.GetIssueTypesCommand; import com.epam.reportportal.extension.jira.command.PostTicketCommand; import com.epam.reportportal.extension.jira.command.RetrieveCreationParamsCommand; +import com.epam.reportportal.extension.jira.command.RetrieveUpdateParamsCommand; import com.epam.reportportal.extension.jira.command.UserSearchCommand; import com.epam.reportportal.extension.jira.command.atlassian.CloudJiraClientProviderExtended; -import com.epam.reportportal.extension.jira.command.RetrieveUpdateParamsCommand; import com.epam.reportportal.extension.jira.command.connection.TestConnectionCommand; import com.epam.reportportal.extension.jira.command.utils.CloudJiraClientProvider; import com.epam.reportportal.extension.jira.command.utils.JIRATicketDescriptionService; @@ -62,7 +62,6 @@ import java.util.stream.Collectors; import javax.annotation.PostConstruct; import org.jasypt.util.text.BasicTextEncryptor; -import org.jooq.DSLContext; import org.pf4j.Extension; import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.annotation.Autowired; @@ -77,7 +76,6 @@ */ @Extension public class CloudJiraExtension implements ReportPortalExtensionPoint, DisposableBean { - private static final String DOCUMENTATION_LINK_FIELD = "documentationLink"; private static final String DOCUMENTATION_LINK = "https://reportportal.io/docs/plugins/AtlassianJiraCloud"; public static final String BINARY_DATA_PROPERTIES_FILE_ID = "binary-data.properties"; @@ -104,10 +102,6 @@ public class CloudJiraExtension implements ReportPortalExtensionPoint, Disposabl @Autowired private ApplicationContext applicationContext; - - @Autowired - private DSLContext dsl; - @Autowired private IntegrationTypeRepository integrationTypeRepository; @@ -174,6 +168,7 @@ protected ObjectMapper configureObjectMapper() { params.put(ALLOWED_COMMANDS, new ArrayList<>(pluginCommandMapping.get().keySet())); params.put(DOCUMENTATION_LINK_FIELD, DOCUMENTATION_LINK); params.put(COMMON_COMMANDS, new ArrayList<>(commonPluginCommandMapping.get().keySet())); + initListeners(); return params; } @@ -192,10 +187,10 @@ public IntegrationGroupEnum getIntegrationGroup() { return IntegrationGroupEnum.BTS; } - @PostConstruct - public void createIntegration() { - initListeners(); - } +// @PostConstruct +// public void createIntegration() { +// initListeners(); +// } private void initListeners() { ApplicationEventMulticaster applicationEventMulticaster = applicationContext.getBean(