This repository was archived by the owner on Jun 28, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +85
-14
lines changed
Expand file tree Collapse file tree 4 files changed +85
-14
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ allprojects {
2929 google()
3030 jcenter()
3131 }
32+ tasks. withType(Javadoc ) {
33+ excludes = [' **/*.kt' ]
34+ }
3235}
3336
3437task clean (type : Delete ) {
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ android {
3131 versionCode versionMajor * 10000 + versionMinor * 100 + versionPatch
3232 versionName " ${ versionMajor} .${ versionMinor} .${ versionPatch} "
3333 version = versionName
34+ group = " jp.studyplus.android.sdk"
3435
3536 testInstrumentationRunner " android.support.test.runner.AndroidJUnitRunner"
3637 }
@@ -84,17 +85,4 @@ dependencies {
8485 implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version "
8586}
8687
87- def repo = new File (rootDir, " repository" )
88-
89- apply plugin : ' maven'
90-
91- uploadArchives {
92- repositories {
93- mavenDeployer {
94- repository url : " file://${ repo.absolutePath} "
95- pom. version = version
96- pom. groupId = ' jp.studyplus.android.sdk'
97- pom. artifactId = ' studyplus-android-sdk'
98- }
99- }
100- }
88+ apply from : ' build.publish.gradle'
Original file line number Diff line number Diff line change 1+ apply plugin : ' maven'
2+ apply plugin : ' signing'
3+
4+ task sourceJar (type : Jar ) {
5+ from android. sourceSets. main. java. srcDirs
6+ classifier " source"
7+ }
8+
9+ task javadoc (type : Javadoc ) {
10+ source = android. sourceSets. main. java. srcDirs
11+ classpath + = project. files(android. getBootClasspath(). join(File . pathSeparator))
12+ destinationDir = file(" ../javadoc/" )
13+ failOnError false
14+ }
15+
16+ task javadocJar (type : Jar , dependsOn : javadoc) {
17+ classifier = ' javadoc'
18+ from tasks. javadoc. destinationDir
19+ }
20+
21+ // Creating sources with comments
22+ task androidSourcesJar (type : Jar ) {
23+ classifier = ' sources'
24+ from android. sourceSets. main. java. srcDirs
25+ }
26+
27+ artifacts {
28+ archives javadocJar
29+ archives androidSourcesJar
30+ }
31+
32+ uploadArchives {
33+ repositories {
34+ mavenDeployer {
35+ beforeDeployment { MavenDeployment deployment -> signing. signPom(deployment) }
36+
37+ repository(url : " https://oss.sonatype.org/service/local/staging/deploy/maven2/" ) {
38+ authentication(userName : sonatypeUsername, password : sonatypePassword)
39+ }
40+
41+ pom. project {
42+ name " Studyplus Android SDK V2"
43+ packaging ' aar'
44+ description ' '
45+ artifactId " studyplus-android-sdk"
46+ url ' https://github.com/studyplus/Studyplus-Android-SDK-V2'
47+
48+ scm {
49+ url
' scm:[email protected] :studyplus/Studyplus-Android-SDK-V2.git' 50+ connection
' scm:[email protected] :studyplus/Studyplus-Android-SDK-V2.git' 51+ developerConnection
' scm:[email protected] :studyplus/Studyplus-Android-SDK-V2.git' 52+ }
53+
54+ licenses {
55+ license {
56+ name ' The MIT License'
57+ url ' https://opensource.org/licenses/MIT'
58+ distribution ' repo'
59+ }
60+ }
61+
62+ developers {
63+ developer {
64+ id developerId
65+ name developerId
66+ }
67+ }
68+ }
69+ }
70+ }
71+ }
Original file line number Diff line number Diff line change 1+ signing.keyId =__your_value__
2+ signing.password =__your_value__
3+ signing.secretKeyRingFile =__your_value__
4+
5+ sonatypeUsername =__your_un__
6+ sonatypePassword =__your_pw__
7+
8+ developerId =__developer_id__
9+ developerName =__developer_name__
You can’t perform that action at this time.
0 commit comments