This repository was archived by the owner on Jun 28, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +27
-39
lines changed
src/main/java/jp/studyplus/android/sdk_example_kt Expand file tree Collapse file tree 6 files changed +27
-39
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ repositories {
1313 mavenCentral()
1414}
1515dependencies {
16- compile ('jp.studyplus.android.sdk:studyplus-android-sdk :2.0.0@aar') {
16+ implementation ('jp.studyplus.android.sdk:studyplus-android-sdk2 :2.0.0@aar') {
1717 transitive = true
1818 }
1919}
@@ -23,7 +23,7 @@ dependencies {
2323```
2424<dependency>
2525 <groupId>jp.studyplus.android.sdk</groupId>
26- <artifactId>studyplus-android-sdk </artifactId>
26+ <artifactId>studyplus-android-sdk2 </artifactId>
2727 <version>2.0.0</version>
2828</dependency>
2929```
Original file line number Diff line number Diff line change @@ -11,8 +11,7 @@ buildscript {
1111 ' gson' : ' 2.8.2' ,
1212 ' okhttp' : ' 3.10.0' ,
1313 ' retrofit' : ' 2.4.0' ,
14- ' rx2' : ' 2.0.2' ,
15- ' moshi' : ' 1.6.0'
14+ ' rx2' : ' 2.0.2'
1615 ]
1716 repositories {
1817 google()
Original file line number Diff line number Diff line change @@ -23,13 +23,19 @@ android {
2323
2424}
2525
26+ repositories {
27+ mavenCentral()
28+ }
29+
2630dependencies {
2731 implementation fileTree(dir : ' libs' , include : [' *.jar' ])
2832
2933 implementation " com.android.support:appcompat-v7:${ versions.supportLibrary} "
3034 implementation " com.android.support.constraint:constraint-layout:${ versions.constraintLayout} "
3135
32- implementation project(' :studyplus-android-sdk2' )
36+ implementation (' jp.studyplus.android.sdk:studyplus-android-sdk2:2.0.0@aar' ) {
37+ transitive = true
38+ }
3339
3440 testImplementation ' junit:junit:4.12'
3541 androidTestImplementation ' com.android.support.test:runner:1.0.2'
Original file line number Diff line number Diff line change @@ -22,13 +22,19 @@ android {
2222 }
2323}
2424
25+ repositories {
26+ mavenCentral()
27+ }
28+
2529dependencies {
2630 implementation fileTree(include : [' *.jar' ], dir : ' libs' )
2731 implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version "
2832 implementation " com.android.support:appcompat-v7:${ versions.supportLibrary} "
2933 implementation " com.android.support.constraint:constraint-layout:${ versions.constraintLayout} "
3034
31- implementation project(' :studyplus-android-sdk2' )
35+ implementation (' jp.studyplus.android.sdk:studyplus-android-sdk2:2.0.0@aar' ) {
36+ transitive = true
37+ }
3238
3339 testImplementation ' junit:junit:4.12'
3440 androidTestImplementation ' com.android.support.test:runner:1.0.2'
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ package jp.studyplus.android.sdk_example_kt
33import android.app.Activity
44import android.content.ActivityNotFoundException
55import android.content.Intent
6- import android.support.v7.app.AppCompatActivity
76import android.os.Bundle
7+ import android.support.v7.app.AppCompatActivity
88import android.view.View
99import android.widget.TextView
1010import android.widget.Toast
@@ -26,18 +26,18 @@ class MainActivity : AppCompatActivity() {
2626 getString(R .string.consumer_secret))
2727
2828 findViewById<View >(R .id.start_auth)?.apply {
29- setOnClickListener( {
29+ setOnClickListener {
3030 try {
3131 Studyplus .instance.startAuth(this @MainActivity, REQUEST_CODE_AUTH )
3232 } catch (e: ActivityNotFoundException ) {
3333 e.printStackTrace()
3434 Toast .makeText(context, " Need for Studyplus 2.14.0+" , Toast .LENGTH_LONG ).show()
3535 }
36- })
36+ }
3737 }
3838
3939 findViewById<View >(R .id.post_study_record)?.apply {
40- setOnClickListener( {
40+ setOnClickListener {
4141 val record = StudyRecordBuilder ()
4242 .setComment(" 勉強した!!!" )
4343 .setAmountTotal(30 )
@@ -56,7 +56,7 @@ class MainActivity : AppCompatActivity() {
5656 }
5757 }
5858 })
59- })
59+ }
6060 }
6161 }
6262
Original file line number Diff line number Diff line change 11apply plugin : ' maven'
22apply plugin : ' signing'
33
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
4+ signing {
5+ required { gradle. taskGraph. hasTask(" uploadArchives" ) }
6+ sign configurations. archives
307}
318
329uploadArchives {
@@ -41,8 +18,8 @@ uploadArchives {
4118 pom. project {
4219 name " Studyplus Android SDK V2"
4320 packaging ' aar'
44- description ' '
45- artifactId " studyplus-android-sdk "
21+ description ' Studyplus Android SDK V2 '
22+ artifactId " studyplus-android-sdk2 "
4623 url ' https://github.com/studyplus/Studyplus-Android-SDK-V2'
4724
4825 scm {
You can’t perform that action at this time.
0 commit comments