Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
88 lines (72 sloc) 1.83 KB
apply plugin: 'eclipse'
apply plugin: 'groovy'
apply plugin: 'java'
apply plugin: 'java-gradle-plugin'
apply plugin: 'ivy-publish'
apply plugin: 'maven-publish'
repositories {
mavenCentral()
jcenter()
maven {
url 'https://sebastianruziczka.de/repo/mvn'
}
}
dependencies {
compileOnly gradleApi()
compileOnly group: 'de.sebastianruziczka', name: 'gradle-cobol-plugin-core', version: 'latest'
testCompile group: 'junit', name: 'junit', version: '4.+'
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.+'
testCompile group: 'org.assertj', name: 'assertj-core', version: '3.+'
testCompile group: 'de.sebastianruziczka', name: 'gradle-cobol-plugin-core', version: 'latest'
}
def applicationName = "CobolPluginUnitTestExtension"
group = 'de.sebastianruziczka'
version = '0.0.30'
def realVersion = ''
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
if (project.hasProperty("generateLatest")) {
realVersion = ' (' + version + ')'
version = 'latest'
println 'Publish: ' + version + realVersion
}
jar {
manifest {
attributes(
"Implementation-Title": project.name,
"Implementation-Version": version + realVersion,
"Build-Date": new Date().format( 'dd.MM.yyyy' )
)
}
into 'res', {
from 'res/main/groovy'
}
}
publishing {
repositories {
ivy {
// change to point to your repo, e.g. http://my.org/repo
url "../repo/ivy"
}
maven {
// change to point to your repo, e.g. http://my.org/repo
url "../repo/mvn"
}
}
}
GradlePropertyFilter propFilter = new GradlePropertyFilter([
'gradle.unitVersion' : version
])
task (generateVersions, type: Copy){
from '.'
into '.'
include '**/*.base'
rename {it - '.base'}
filter { line ->propFilter.filter(line)}
}
task (switchOffline, type:Copy){
from '.'
into '.'
include '**/*.offline'
rename {it - '.offline'}
}