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()
22isSNAPSHOT = 'git rev-parse --abbrev-ref HEAD'.execute().text.trim() == 'master'
23
24if (isSNAPSHOT) {
25  version = version + '-SNAPSHOT'
26}
27
28repositories {
29	mavenLocal()
30	mavenCentral()
31}
32
33nexus {
34    attachSources = true
35    attachTests = false
36    attachJavadoc = true
37    sign = true
38}
39
40modifyPom {
41    project {
42        name 'minidns'
43        description 'Minimal DNS library for java and android systems'
44        url 'https://github.com/rtreffer/minidns'
45        inceptionYear '2014'
46
47        scm {
48            url 'https://github.com/rtreffer/minidns'
49            connection 'scm:https://github.com/rtreffer/minidns'
50            developerConnection 'scm:git://github.com/rtreffer/minidns.git'
51        }
52
53        licenses {
54            license {
55                name 'The Apache Software License, Version 2.0'
56                url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
57                distribution 'repo'
58            }
59        }
60
61        developers {
62            developer {
63                id 'rtreffer'
64                name 'Rene Treffer'
65                email 'treffer@measite.de'
66            }
67            developer {
68                id 'flow'
69                name 'Florian Schmaus'
70                email 'flow@geekplace.eu'
71            }
72        }
73    }
74}
75
76dependencies {
77}