@@ -3,6 +3,8 @@ apply plugin: 'eclipse'
33apply plugin : ' pmd'
44apply plugin : ' findbugs'
55apply plugin : ' checkstyle'
6+ apply plugin : ' maven'
7+ apply plugin : ' signing'
68
79repositories {
810 mavenCentral()
@@ -33,3 +35,67 @@ checkstyle {
3335task wrapper (type : Wrapper ) {
3436 gradleVersion = ' 2.5'
3537}
38+
39+ // Define how we publish artifacts to Maven.
40+ // Derived from instructions on the Central Repository site:
41+ // http://central.sonatype.org/pages/gradle.html
42+ group = " net.alloyggp"
43+ version = " 0.0.1"
44+ task javadocJar (type : Jar ) {
45+ classifier = ' javadoc'
46+ from javadoc
47+ }
48+ task sourcesJar (type : Jar ) {
49+ classifier = ' sources'
50+ from sourceSets. main. allSource
51+ }
52+ artifacts {
53+ archives javadocJar, sourcesJar
54+ }
55+ signing {
56+ sign configurations. archives
57+ }
58+ uploadArchives {
59+ repositories {
60+ mavenDeployer {
61+ beforeDeployment { MavenDeployment deployment -> signing. signPom(deployment) }
62+
63+ repository(url : " https://oss.sonatype.org/service/local/staging/deploy/maven2/" ) {
64+ authentication(userName : ossrhUsername, password : ossrhPassword)
65+ }
66+
67+ snapshotRepository(url : " https://oss.sonatype.org/content/repositories/snapshots/" ) {
68+ authentication(userName : ossrhUsername, password : ossrhPassword)
69+ }
70+
71+ pom. project {
72+ name ' ggp-tournament'
73+ packaging ' jar'
74+ artifactId = " ggp-tournament"
75+ description ' A library for GGP tournament specification and scheduling.'
76+ url ' https://github.com/AlexLandau/ggp-tournament'
77+
78+ scm {
79+ connection ' scm:git:git@github.com:AlexLandau/ggp-tournament.git'
80+ developerConnection ' scm:git:git@github.com:AlexLandau/ggp-tournament.git'
81+ url ' git@github.com:AlexLandau/ggp-tournament.git'
82+ }
83+
84+ licenses {
85+ license {
86+ name ' The MIT License'
87+ url ' http://opensource.org/licenses/MIT'
88+ }
89+ }
90+
91+ developers {
92+ developer {
93+ id ' AlexLandau'
94+ name ' Alex Landau'
95+ email ' alex@alloyggp.net'
96+ }
97+ }
98+ }
99+ }
100+ }
101+ }
0 commit comments