From 179412d8b3c3ee8f9f36386e9a3661e525ebf314 Mon Sep 17 00:00:00 2001 From: zaharchenko Date: Fri, 17 Jan 2020 06:18:43 +0400 Subject: [PATCH] Upgrade to CUBA 7.2-SNAPSHOT #92 --- build.gradle | 56 ++++++++---------------- gradle/wrapper/gradle-wrapper.properties | 2 +- 2 files changed, 20 insertions(+), 38 deletions(-) diff --git a/build.gradle b/build.gradle index ebb605d..2f0cdf4 100644 --- a/build.gradle +++ b/build.gradle @@ -15,7 +15,7 @@ */ buildscript { - ext.cubaVersion = '7.1.1' + ext.cubaVersion = '7.2-SNAPSHOT' repositories { mavenLocal() if (System.getenv('HAULMONT_REPOSITORY_URL')) { @@ -29,11 +29,7 @@ buildscript { } maven { - url 'https://repo.cuba-platform.com/content/groups/work' - credentials { - username(rootProject.hasProperty('repoUser') ? rootProject['repoUser'] : 'cuba') - password(rootProject.hasProperty('repoPass') ? rootProject['repoPass'] : 'cuba123') - } + url 'https://dl.bintray.com/cuba-platform/main' } } @@ -58,7 +54,7 @@ apply(plugin: 'addon-gradle-plugin') cuba { artifact { group = 'com.haulmont.addon.imap' - version = '1.4' + version = '1.5' isSnapshot = true } tomcat { @@ -99,20 +95,20 @@ configure([globalModule, coreModule, webModule]) { sourceSets { main { - java { srcDirs = ["src"] } - resources { - srcDir 'resources' - } + groovy { srcDirs = ["src"] } + // new config + java.outputDir = new File(project.buildDir, "classes/main") + groovy.outputDir = new File(project.buildDir, "classes/main") } test { - java { - srcDirs = ['test'] - } - groovy { - srcDirs = ['test'] - } + groovy { srcDirs = ["test"] } + // new config + java.outputDir = new File(project.buildDir, "classes/test") + groovy.outputDir = new File(project.buildDir, "classes/test") } } + sourceSets.main.output.classesDirs.setFrom(new File(project.buildDir, "classes/main")) + sourceSets.test.output.classesDirs.setFrom(new File(project.buildDir, "classes/test")) dependencies { testCompile( @@ -185,15 +181,8 @@ configure(coreModule) { } - task cleanConf(description: 'Cleans up conf directory') { - doLast { - def dir = new File(cuba.tomcat.dir, "/conf/${modulePrefix}-core") - if (dir.isDirectory()) { - ant.delete(includeemptydirs: true) { - fileset(dir: dir, includes: '**/*', excludes: 'local.app.properties') - } - } - } + task cleanConf(description: 'Cleans up conf directory', type: Delete) { + delete "$cuba.appHome/${modulePrefix}-core/conf" } task deploy(dependsOn: [assemble, cleanConf], type: CubaDeployment) { @@ -244,7 +233,7 @@ configure(webModule) { task deployConf(type: Copy) { from file('src') include "com/haulmont/addon/imap/**" - into "$cuba.tomcat.dir/conf/${modulePrefix}" + into "$cuba.appHome/${modulePrefix}/conf" } task clearMessagesCache(type: CubaClearMessagesCache) { @@ -252,15 +241,8 @@ configure(webModule) { } deployConf.dependsOn clearMessagesCache - task cleanConf(description: 'Cleans up conf directory') { - doLast { - def dir = new File(cuba.tomcat.dir, "/conf/${modulePrefix}") - if (dir.isDirectory()) { - ant.delete(includeemptydirs: true) { - fileset(dir: dir, includes: '**/*', excludes: 'local.app.properties') - } - } - } + task cleanConf(description: 'Cleans up conf directory', type: Delete) { + delete "$cuba.appHome/${modulePrefix}/conf" } task deploy(dependsOn: [assemble, cleanConf], type: CubaDeployment) { @@ -283,9 +265,9 @@ task restart(dependsOn: ['stop', ":${modulePrefix}-core:deploy", ":${modulePrefi socket(server: 'localhost', port: '8788') } } - start.execute() } } +restart.finalizedBy start apply from: 'extra.gradle' diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 290541c..5028f28 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists