diff --git a/.github/workflows/continuous-integration-43x.yml b/.github/workflows/continuous-integration-43x.yml index df8a75d5ef..6eeeb43ebc 100644 --- a/.github/workflows/continuous-integration-43x.yml +++ b/.github/workflows/continuous-integration-43x.yml @@ -36,5 +36,5 @@ jobs: - name: Build the project and Deploy to Artifactory run: | - jf gradle build install artifactoryPublish -x test -I gradle/initscript.gradle + jf gradle build install artifactoryPublish -x test jf rt build-publish diff --git a/build.gradle b/build.gradle index 8511bcdd94..37fead1f93 100644 --- a/build.gradle +++ b/build.gradle @@ -16,15 +16,24 @@ buildscript { } } -apply plugin: org.jfrog.gradle.plugin.artifactory.ArtifactoryPlugin - plugins { id 'org.sonarqube' version '2.6.2' id 'org.asciidoctor.jvm.pdf' version '3.1.0' id 'org.asciidoctor.jvm.gems' version '3.1.0' id 'org.asciidoctor.jvm.convert' version '3.1.0' + id 'com.jfrog.artifactory' version '5.1.11' +} + +artifactory { + publish { + defaults { + publications('ALL_PUBLICATIONS') + } + } } +artifactoryPublish.skip = true + ext { linkHomepage = 'https://projects.spring.io/spring-batch/' linkCi = 'https://build.spring.io/browse/BATCH' @@ -412,11 +421,13 @@ project('spring-batch-infrastructure') { project('spring-batch-docs') { description = 'Spring Batch Docs' project.tasks.findByPath("artifactoryPublish")?.enabled = false + artifactoryPublish.skip = true } project('spring-batch-core-tests') { description = 'Spring Batch Core Tests' project.tasks.findByPath("artifactoryPublish")?.enabled = false + artifactoryPublish.skip = true dependencies { compile project(":spring-batch-core") compile project(":spring-batch-infrastructure") @@ -456,6 +467,7 @@ project('spring-batch-core-tests') { project('spring-batch-infrastructure-tests') { description = 'Spring Batch Infrastructure Tests' project.tasks.findByPath("artifactoryPublish")?.enabled = false + artifactoryPublish.skip = true dependencies { compile project(":spring-batch-infrastructure") compile "javax.jms:javax.jms-api:$jmsVersion" @@ -586,6 +598,7 @@ project('spring-batch-integration') { project('spring-batch-samples') { description = 'Batch Batch Samples' project.tasks.findByPath("artifactoryPublish")?.enabled = false + artifactoryPublish.skip = true dependencies { diff --git a/gradle/initscript.gradle b/gradle/initscript.gradle deleted file mode 100644 index 4184488317..0000000000 --- a/gradle/initscript.gradle +++ /dev/null @@ -1,38 +0,0 @@ -import org.jfrog.gradle.plugin.artifactory.ArtifactoryPlugin -import org.jfrog.gradle.plugin.artifactory.task.ArtifactoryTask - -initscript { - dependencies { - classpath fileTree('${pluginLibDir}') - } -} - -addListener(new BuildInfoPluginListener()) - -class BuildInfoPluginListener extends BuildAdapter { - - def void projectsLoaded(Gradle gradle) { - Map projectProperties = new HashMap(gradle.startParameter.getProjectProperties()) - projectProperties.put("build.start", Long.toString(System.currentTimeMillis())) - gradle.startParameter.setProjectProperties(projectProperties) - Project root = gradle.getRootProject() - root.logger.debug("Artifactory plugin: projectsEvaluated: ${root.name}") - if (!"buildSrc".equals(root.name)) { - root.allprojects { - apply { - apply plugin: ArtifactoryPlugin - } - } - } - - // Set the "mavenJava" and "ivyJava" publications or - // "archives" configuration to all Artifactory tasks. - for (Project p : root.getAllprojects()) { - Task t = p.getTasks().findByName(ArtifactoryTask.ARTIFACTORY_PUBLISH_TASK_NAME) - if (t != null) { - ArtifactoryTask task = (ArtifactoryTask) t - task.setCiServerBuild() - } - } - } -} \ No newline at end of file