Skip to content

Commit 081a13a

Browse files
authored
Merge pull request #1 from PersephonyAPI/jitpack
Modify Gradle configuration to support Jitpack
2 parents 3770e52 + f5a4b6b commit 081a13a

File tree

3 files changed

+36
-47
lines changed

3 files changed

+36
-47
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
## Introduction
22
The Persephony Java SDK will allow you to easily use the Persephony API in a Java application.
33

4-
### Build
5-
- Clone this repo, install [gradle](https://gradle.org/), then run `gradle build`. The `jar` will be created in the `build` directory.
6-
- Add the file as a dependency of your project.
4+
### SDK Installation
5+
6+
To include the SDK in your build, follow the instructions on [Jitpack](https://jitpack.io/#PersephonyAPI/java-sdk)
77

88
## Testing your Installation
99

build.gradle

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,57 @@
1-
version = "0.0.0-rc.1"
2-
3-
gradle.projectsEvaluated {
4-
tasks.withType(JavaCompile) {
5-
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
6-
sourceCompatibility = "1.7"
7-
targetCompatibility = "1.7"
8-
}
9-
}
10-
11-
// Apply the java plugin to add support for Java
121
apply plugin: 'java'
2+
apply plugin: 'maven'
133

14-
jar {
15-
manifest {
16-
attributes 'Implementation-Title': 'Persephony Java SDK', 'Implementation-Version': version
17-
}
18-
}
4+
group = 'com.github.PersephonyAPI'
5+
6+
sourceCompatibility = 1.7 // java 7
7+
targetCompatibility = 1.7
198

20-
// In this section you declare where to find the dependencies of your project
219
repositories {
22-
mavenCentral();
10+
mavenCentral()
2311
}
2412

25-
// In this section you declare the dependencies for your production and test code
2613
dependencies {
2714
testCompile "org.mockito:mockito-core:2.6.8"
2815
testCompile 'org.mock-server:mockserver-netty:3.10.4'
2916
testCompile 'info.cukes:cucumber-java:1.2.4'
3017
testCompile 'info.cukes:cucumber-junit:1.2.4'
3118
testCompile 'junit:junit:4.12'
3219

33-
// The production code uses the SLF4J logging API at compile time
34-
compile 'org.slf4j:slf4j-api:1.7.21'
3520
compile 'com.google.code.gson:gson:2.6.2'
3621
}
3722

23+
task sourcesJar(type: Jar, dependsOn: classes) {
24+
classifier = 'sources'
25+
from sourceSets.main.allSource
26+
}
27+
28+
task javadocJar(type: Jar, dependsOn: javadoc) {
29+
classifier = 'javadoc'
30+
from javadoc.destinationDir
31+
}
32+
3833
test {
3934
testLogging.showStandardStreams = true
4035
systemProperties System.getProperties()
4136
}
4237

43-
uploadArchives {
44-
repositories {
45-
flatDir {
46-
dirs 'repos'
38+
artifacts {
39+
archives sourcesJar
40+
archives javadocJar
41+
}
42+
43+
// To specify a license in the pom:
44+
install {
45+
repositories.mavenInstaller {
46+
pom.project {
47+
licenses {
48+
license {
49+
name 'The Apache Software License, Version 2.0'
50+
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
51+
distribution 'repo'
52+
}
53+
}
4754
}
4855
}
4956
}
57+

settings.gradle

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)