build.gradle

 1apply plugin: 'java'
 2apply plugin: 'eclipse'
 3apply plugin: 'osgi'
 4apply plugin: 'nexus'
 5
 6buildscript {
 7    repositories {
 8        jcenter()
 9        mavenLocal()
10        mavenCentral()
11    }
12
13    dependencies {
14        classpath 'org.gradle.api.plugins:gradle-nexus-plugin:0.7.1'
15    }
16}
17
18group = 'de.measite.minidns'
19description = "A minimal DNS client library with support for A, AAAA, NS and SRV records"
20sourceCompatibility = 1.7
21version = 'git tag --points-at HEAD'.execute().text.trim()
22
23ext {
24	isSNAPSHOT = 'git rev-parse --abbrev-ref HEAD'.execute().text.trim() == 'master'
25}
26
27if (isSNAPSHOT) {
28  version = version + '-SNAPSHOT'
29}
30
31repositories {
32	mavenLocal()
33	mavenCentral()
34}
35
36nexus {
37    attachSources = true
38    attachTests = false
39    attachJavadoc = true
40    sign = true
41}
42
43modifyPom {
44    project {
45        name 'minidns'
46        description 'Minimal DNS library for java and android systems'
47        url 'https://github.com/rtreffer/minidns'
48        inceptionYear '2014'
49
50        scm {
51            url 'https://github.com/rtreffer/minidns'
52            connection 'scm:https://github.com/rtreffer/minidns'
53            developerConnection 'scm:git://github.com/rtreffer/minidns.git'
54        }
55
56        licenses {
57            license {
58                name 'The Apache Software License, Version 2.0'
59                url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
60                distribution 'repo'
61            }
62        }
63
64        developers {
65            developer {
66                id 'rtreffer'
67                name 'Rene Treffer'
68                email 'treffer@measite.de'
69            }
70            developer {
71                id 'flow'
72                name 'Florian Schmaus'
73                email 'flow@geekplace.eu'
74            }
75        }
76    }
77}
78
79dependencies {
80}