initial
This commit is contained in:
76
build.gradle
Normal file
76
build.gradle
Normal file
@ -0,0 +1,76 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
maven { url 'http://nexus.red-soft.biz/nexus/content/groups/public' }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'biz.redsoft.gradle.ncore:gradle-ncore:+'
|
||||
}
|
||||
}
|
||||
|
||||
group = 'biz.redsoft.sample'
|
||||
|
||||
apply plugin: 'application'
|
||||
apply plugin: 'war'
|
||||
apply plugin: 'ncore'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
|
||||
targetCompatibility = 1.6
|
||||
|
||||
ncore {
|
||||
coreVersion = '1.2.18.1'
|
||||
coreJarsigned = true
|
||||
sourceEncoding = 'UTF-8'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
provided 'javax.servlet:javax.servlet-api:3.0.1'
|
||||
|
||||
testCompile 'junit:junit:4.+'
|
||||
}
|
||||
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
project.hasProperty('biz.redsoft.repo.user') && project.hasProperty('biz.redsoft.repo.password') && maven {
|
||||
credentials {
|
||||
username project.'biz.redsoft.repo.user'
|
||||
password project.'biz.redsoft.repo.password'
|
||||
}
|
||||
def suffix = project.version.toString().endsWith('SNAPSHOT') ? 'snapshots' : 'releases'
|
||||
url "http://nexus.red-soft.biz/nexus/content/repositories/${suffix}"
|
||||
}
|
||||
}
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
from components.java
|
||||
|
||||
artifact sourceJar
|
||||
artifact updatesJar
|
||||
}
|
||||
mavenJavaGen(MavenPublication) {
|
||||
artifactId "${genJar.baseName}-${genJar.appendix}"
|
||||
artifact genJar
|
||||
artifact genSourceJar
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task copyDist(type: Copy) {
|
||||
from distZip
|
||||
from war
|
||||
def releaseDir
|
||||
if (project.hasProperty('biz.redsoft.release.dir') && project.getProperty('biz.redsoft.release.dir'))
|
||||
releaseDir = "${project.getProperty('biz.redsoft.release.dir')}"
|
||||
else
|
||||
releaseDir = "$projectDir/../releases"
|
||||
into "$releaseDir/$project.name/$version"
|
||||
}
|
||||
|
||||
release {
|
||||
tagPrefix = 'v'
|
||||
}
|
||||
|
||||
task buildRelease(type: GradleBuild) {
|
||||
tasks = ['clean', 'writeVersion', 'nbackup', 'build', 'copyDist', 'publish']
|
||||
}
|
||||
Reference in New Issue
Block a user