Skip to content

Commit

Permalink
#9 refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
bresche committed Jun 27, 2018
1 parent 5e8c219 commit 87a2cba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 40 deletions.
28 changes: 2 additions & 26 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ buildscript {
password(rootProject.hasProperty('repoPass') ? rootProject['repoPass'] : 'cuba123')
}
}



}

dependencies {
classpath "com.haulmont.gradle:cuba-plugin:$cubaVersion"
// Bintray upload plugin
Expand All @@ -32,8 +30,6 @@ def servletApi = 'javax.servlet:javax.servlet-api:3.1.0'
apply(plugin: 'idea')
apply(plugin: 'cuba')

def bintrayRepositoryUrl = "https://api.bintray.com/maven/balvi/cuba-components/cuba-component-declarative-controllers/;publish=1"

cuba {
artifact {
group = 'de.balvi.cuba.declarativecontrollers'
Expand All @@ -43,16 +39,6 @@ cuba {
tomcat {
dir = "$project.rootDir/deploy/tomcat"
}
uploadRepository {
if (cuba.artifact.isSnapshot) {
url = System.properties['uploadRepositorySnapshot'] ?: System.env.UPLOAD_REPOSITORY_SNAPSHOT
} else {
url = System.properties['uploadRepositoryRelease'] ?: System.env.UPLOAD_REPOSITORY_RELEASE ?: bintrayRepositoryUrl
}

user = System.properties['uploadRepositoryUsername'] ?: System.env.UPLOAD_REPOSITORY_USERNAME
password = System.properties['uploadRepositoryPassword'] ?:System.env.UPLOAD_REPOSITORY_PASSWORD
}
ide {
vcs = 'Git'
}
Expand Down Expand Up @@ -90,12 +76,10 @@ cobertura {

}


test.dependsOn(subprojects.collect{ ":${it.name}:test"} )
test.finalizedBy(project.tasks.cobertura)
test.finalizedBy(project.tasks.coberturaCheck)


configure([globalModule, coreModule, guiModule, webModule]) {
apply(plugin: 'java')
apply(plugin: 'maven')
Expand All @@ -104,7 +88,6 @@ configure([globalModule, coreModule, guiModule, webModule]) {

dependencies {
testCompile('junit:junit:4.12')

testCompile('org.spockframework:spock-core:1.0-groovy-2.4')
testCompile('org.springframework:spring-test:4.3.1.RELEASE')
testRuntime "cglib:cglib-nodep:3.2.4"
Expand Down Expand Up @@ -170,8 +153,6 @@ configure(globalModule) {
attributes('App-Component-Version': cuba.artifact.version + (cuba.artifact.isSnapshot ? '-SNAPSHOT' : ''))
}
}


}

configure(coreModule) {
Expand Down Expand Up @@ -225,7 +206,6 @@ configure(coreModule) {
configure(guiModule) {
dependencies {
compile(globalModule)

}

task deployConf(type: Copy) {
Expand All @@ -243,7 +223,6 @@ configure(webModule) {
dependencies {
provided(servletApi)
compile(guiModule)

}

task webArchive(type: Zip) {
Expand All @@ -265,6 +244,7 @@ configure(webModule) {
task clearMessagesCache(type: CubaClearMessagesCache) {
appName = 'declarativecontrollers'
}

deployConf.dependsOn clearMessagesCache

task cleanConf(description: 'Cleans up conf directory') {
Expand All @@ -284,10 +264,6 @@ configure(webModule) {
}
}





task undeploy(type: Delete, dependsOn: ':declarativecontrollers-web:cleanConf') {
delete("$cuba.tomcat.dir/shared")
delete("$cuba.tomcat.dir/webapps/declarativecontrollers-core")
Expand Down
15 changes: 1 addition & 14 deletions upload-to-repository.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
#!/usr/bin/env bash

if [[ -z "$1" || -z "$2" ]]
then
echo "Define username, password and repository URL as parameters. Usage: ./upload-to-repository.sh myUser myPassword https://api.bintray.com/maven/balvi/..."

else
if [[ -z "$3" ]]
then
./gradlew -DuploadRepositoryUsername=$1 -DuploadRepositoryPassword=$2 uploadArchives
else
./gradlew -DuploadRepositoryUsername=$1 -DuploadRepositoryPassword=$2 -DuploadRepositoryRelease=$3 uploadArchives

fi

fi
./gradlew clean assemble bintrayUpload

0 comments on commit 87a2cba

Please sign in to comment.