@@ -7,6 +7,8 @@ repositories {
77
88apply plugin : ' java'
99apply plugin : ' groovy'
10+ apply plugin : ' maven'
11+ apply plugin : ' signing'
1012
1113dependencies {
1214 compile ' org.xerial:sqlite-jdbc:3.7.15-SNAPSHOT'
@@ -17,4 +19,94 @@ dependencies {
1719 testCompile ' junit:junit:4.+'
1820}
1921
22+ group = ' com.novoda'
23+ version = " 0.0.1-SNAPSHOT"
24+
25+ ext {
26+ sourceCompatibility = 1.6
27+ targetCompatibility = 1.6
28+ }
29+
30+
31+ task javadocJar (type : Jar , dependsOn : javadoc) {
32+ classifier = ' javadoc'
33+ from groovydoc
34+ }
35+
36+ task sourcesJar (type : Jar ) {
37+ from sourceSets. main. allSource
38+ classifier = ' sources'
39+ }
40+
41+ artifacts {
42+ archives jar
43+ archives javadocJar
44+ archives sourcesJar
45+ }
46+
47+ if (project. hasProperty(" signing.keyId" )) {
48+ signing {
49+ sign configurations. archives
50+ }
51+ }
52+
53+ uploadArchives {
54+ repositories {
55+ mavenDeployer {
56+
57+ // don't sign snapshots for now
58+ if (! version. endsWith(' SNAPSHOT' )) {
59+ beforeDeployment { deployment -> signing. signPom(deployment) }
60+ }
61+
62+ if (project. hasProperty(' nexusUsername' )) {
63+ snapshotRepository(url : " https://oss.sonatype.org/content/repositories/snapshots" ) {
64+ authentication(userName : nexusUsername, password : nexusPassword)
65+ }
66+
67+ repository(url : " https://oss.sonatype.org/service/local/staging/deploy/maven2" ) {
68+ authentication(userName : nexusUsername, password : nexusPassword)
69+ }
70+ }
71+ uniqueVersion = false
72+
73+ pom. artifactId = ' sqlite-analyzer'
74+ pom. project {
75+
76+ parent {
77+ groupId ' org.sonatype.oss'
78+ artifactId ' oss-parent'
79+ version ' 7'
80+ }
81+
82+ name ' sqliteAnalyzer Gradle Plugin'
83+ packaging ' jar'
84+ description ' Code generation for sqlite database access.'
85+ url ' https://github.com/novoda/sqliteAnalyzer'
86+
87+ scm {
88+ url ' https://github.com/novoda/sqliteAnalyzer'
89+ connection ' scm:https://novoda@github.com/novoda/sqliteAnalyzer.git'
90+ developerConnection ' scm:git@github.com:novoda/sqliteAnalyzer.git'
91+ }
92+
93+ licenses {
94+ license {
95+ name ' The Apache Software License, Version 2.0'
96+ url ' http://www.apache.org/licenses/LICENSE-2.0.txt'
97+ distribution ' repo'
98+ }
99+ }
100+
101+ developers {
102+ developer {
103+ id ' devisnik'
104+ name ' Volker Leck'
105+ }
106+ }
107+ }
108+ }
109+ }
110+ }
111+
20112
0 commit comments