|
1 |
| -/* |
2 |
| - * This file was generated by the Gradle 'init' task. |
3 |
| - * |
4 |
| - * This is a general purpose Gradle build. |
5 |
| - * Learn how to create Gradle builds at https://guides.gradle.org/creating-new-gradle-builds/ |
6 |
| - */ |
7 |
| -buildscript { |
8 |
| - repositories { |
9 |
| - jcenter() |
10 |
| - //Add only for SNAPSHOT versions |
11 |
| - //maven { url "http://oss.sonatype.org/content/repositories/snapshots/" } |
12 |
| - } |
13 |
| - dependencies { |
14 |
| - classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.11.0" |
15 |
| - } |
16 |
| -} |
17 |
| - |
18 | 1 | plugins {
|
19 | 2 | id 'java'
|
20 |
| - id 'maven' |
21 |
| - id 'maven-publish' |
22 |
| - id 'com.github.kt3k.coveralls' version '2.8.2' |
23 | 3 | }
|
24 | 4 |
|
| 5 | +group 'com.starkbank.ellipticcurve' |
| 6 | +version '1.0.0' |
| 7 | + |
25 | 8 | sourceCompatibility = 1.7
|
26 |
| -targetCompatibility = 1.7 |
27 | 9 |
|
28 |
| -group = GROUP |
29 |
| -version = VERSION_NAME |
| 10 | +repositories { |
| 11 | + mavenCentral() |
| 12 | +} |
| 13 | +dependencies { |
| 14 | + testCompile group: 'junit', name: 'junit', version: '4.12' |
| 15 | + testCompile group: 'org.mockito', name: 'mockito-core', version: '2.22.0' |
| 16 | +} |
30 | 17 |
|
| 18 | +apply plugin: 'maven' |
| 19 | +apply plugin: 'signing' |
31 | 20 |
|
32 |
| -tasks.withType(JavaCompile) { |
33 |
| - options.compilerArgs << "-Xlint:all" << "-Xlint:-options" << "-Xlint:-processing" |
34 |
| - options.encoding = 'UTF-8' |
35 |
| -} |
| 21 | +archivesBaseName = "starkbank-ecdsa" |
36 | 22 |
|
37 |
| -configurations.all { |
| 23 | + |
| 24 | +task javadocJar(type: Jar) { |
| 25 | + classifier = 'javadoc' |
| 26 | + from javadoc |
38 | 27 | }
|
39 | 28 |
|
40 |
| -repositories { |
41 |
| - jcenter() |
| 29 | +task sourcesJar(type: Jar) { |
| 30 | + classifier = 'sources' |
| 31 | + from sourceSets.main.allSource |
42 | 32 | }
|
43 | 33 |
|
44 |
| -dependencies { |
45 |
| - testCompile group: 'junit', name: 'junit', version: '4.12' |
46 |
| - testCompile group: 'org.mockito', name: 'mockito-core', version: '2.22.0' |
| 34 | +artifacts { |
| 35 | + archives javadocJar, sourcesJar |
47 | 36 | }
|
48 | 37 |
|
49 |
| -jar { |
50 |
| - manifest { |
51 |
| - attributes("Implementation-Title": POM_NAME, |
52 |
| - "Implementation-Version": VERSION_NAME, |
53 |
| - "Implementation-Vendor": VENDOR_NAME) |
54 |
| - } |
| 38 | +signing { |
| 39 | + sign configurations.archives |
55 | 40 | }
|
56 |
| -//Uncomment after setting up maven central account |
57 |
| -//apply from: 'deploy.gradle' |
58 | 41 |
|
59 |
| -test { |
60 |
| - testLogging { |
61 |
| - events "passed", "skipped", "failed" |
62 |
| - exceptionFormat "full" |
| 42 | +uploadArchives { |
| 43 | + repositories { |
| 44 | + mavenDeployer { |
| 45 | + beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } |
| 46 | + |
| 47 | + repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { |
| 48 | + authentication( |
| 49 | + userName: project.hasProperty('ossrhUsername') ? project.property('ossrhUsername') : 'username', |
| 50 | + password: project.hasProperty('ossrhPassword') ? project.property('ossrhPassword') : 'password' |
| 51 | + ) |
| 52 | + } |
| 53 | + |
| 54 | + snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { |
| 55 | + authentication( |
| 56 | + userName: project.hasProperty('ossrhUsername') ? project.property('ossrhUsername') : 'username', |
| 57 | + password: project.hasProperty('ossrhPassword') ? project.property('ossrhPassword') : 'password' |
| 58 | + ) |
| 59 | + } |
| 60 | + |
| 61 | + pom.project { |
| 62 | + name 'StarkBank SDK Java' |
| 63 | + packaging 'jar' |
| 64 | + // optionally artifactId can be defined here |
| 65 | + description 'SDK to facilitate Java integrations with the Stark Bank API' |
| 66 | + url 'https://github.com/starkbank/sdk-java' |
| 67 | + |
| 68 | + scm { |
| 69 | + connection 'scm:git:git://github.com/starkbank/sdk-java.git' |
| 70 | + developerConnection 'scm:git:ssh://github.com/starkbank/sdk-java.git' |
| 71 | + url 'https://github.com/starkbank/sdk-java/' |
| 72 | + } |
| 73 | + |
| 74 | + licenses { |
| 75 | + license { |
| 76 | + name 'MIT License' |
| 77 | + url 'https://github.com/starkbank/sdk-java/blob/master/LICENSE' |
| 78 | + } |
| 79 | + } |
| 80 | + |
| 81 | + developers { |
| 82 | + developer { |
| 83 | + id 'rcmstark' |
| 84 | + name 'Rafael Stark' |
| 85 | + |
| 86 | + } |
| 87 | + developer { |
| 88 | + id 'daltonmenezes' |
| 89 | + name 'Dalton Menezes' |
| 90 | + |
| 91 | + } |
| 92 | + developer { |
| 93 | + id 'cdottori' |
| 94 | + name 'Caio Dottori' |
| 95 | + |
| 96 | + } |
| 97 | + developer { |
| 98 | + id 'thalesmello' |
| 99 | + name 'Thales Mello' |
| 100 | + |
| 101 | + } |
| 102 | + } |
| 103 | + } |
| 104 | + } |
63 | 105 | }
|
64 | 106 | }
|
0 commit comments