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 {
13
13
mavenCentral()
14
14
}
15
15
dependencies {
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') {
17
17
transitive = true
18
18
}
19
19
}
@@ -23,7 +23,7 @@ dependencies {
23
23
```
24
24
<dependency>
25
25
<groupId>jp.studyplus.android.sdk</groupId>
26
- <artifactId>studyplus-android-sdk </artifactId>
26
+ <artifactId>studyplus-android-sdk2 </artifactId>
27
27
<version>2.0.0</version>
28
28
</dependency>
29
29
```
Original file line number Diff line number Diff line change @@ -11,8 +11,7 @@ buildscript {
11
11
' gson' : ' 2.8.2' ,
12
12
' okhttp' : ' 3.10.0' ,
13
13
' retrofit' : ' 2.4.0' ,
14
- ' rx2' : ' 2.0.2' ,
15
- ' moshi' : ' 1.6.0'
14
+ ' rx2' : ' 2.0.2'
16
15
]
17
16
repositories {
18
17
google()
Original file line number Diff line number Diff line change @@ -23,13 +23,19 @@ android {
23
23
24
24
}
25
25
26
+ repositories {
27
+ mavenCentral()
28
+ }
29
+
26
30
dependencies {
27
31
implementation fileTree(dir : ' libs' , include : [' *.jar' ])
28
32
29
33
implementation " com.android.support:appcompat-v7:${ versions.supportLibrary} "
30
34
implementation " com.android.support.constraint:constraint-layout:${ versions.constraintLayout} "
31
35
32
- implementation project(' :studyplus-android-sdk2' )
36
+ implementation (' jp.studyplus.android.sdk:studyplus-android-sdk2:2.0.0@aar' ) {
37
+ transitive = true
38
+ }
33
39
34
40
testImplementation ' junit:junit:4.12'
35
41
androidTestImplementation ' com.android.support.test:runner:1.0.2'
Original file line number Diff line number Diff line change @@ -22,13 +22,19 @@ android {
22
22
}
23
23
}
24
24
25
+ repositories {
26
+ mavenCentral()
27
+ }
28
+
25
29
dependencies {
26
30
implementation fileTree(include : [' *.jar' ], dir : ' libs' )
27
31
implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version "
28
32
implementation " com.android.support:appcompat-v7:${ versions.supportLibrary} "
29
33
implementation " com.android.support.constraint:constraint-layout:${ versions.constraintLayout} "
30
34
31
- implementation project(' :studyplus-android-sdk2' )
35
+ implementation (' jp.studyplus.android.sdk:studyplus-android-sdk2:2.0.0@aar' ) {
36
+ transitive = true
37
+ }
32
38
33
39
testImplementation ' junit:junit:4.12'
34
40
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
3
3
import android.app.Activity
4
4
import android.content.ActivityNotFoundException
5
5
import android.content.Intent
6
- import android.support.v7.app.AppCompatActivity
7
6
import android.os.Bundle
7
+ import android.support.v7.app.AppCompatActivity
8
8
import android.view.View
9
9
import android.widget.TextView
10
10
import android.widget.Toast
@@ -26,18 +26,18 @@ class MainActivity : AppCompatActivity() {
26
26
getString(R .string.consumer_secret))
27
27
28
28
findViewById<View >(R .id.start_auth)?.apply {
29
- setOnClickListener( {
29
+ setOnClickListener {
30
30
try {
31
31
Studyplus .instance.startAuth(this @MainActivity, REQUEST_CODE_AUTH )
32
32
} catch (e: ActivityNotFoundException ) {
33
33
e.printStackTrace()
34
34
Toast .makeText(context, " Need for Studyplus 2.14.0+" , Toast .LENGTH_LONG ).show()
35
35
}
36
- })
36
+ }
37
37
}
38
38
39
39
findViewById<View >(R .id.post_study_record)?.apply {
40
- setOnClickListener( {
40
+ setOnClickListener {
41
41
val record = StudyRecordBuilder ()
42
42
.setComment(" 勉強した!!!" )
43
43
.setAmountTotal(30 )
@@ -56,7 +56,7 @@ class MainActivity : AppCompatActivity() {
56
56
}
57
57
}
58
58
})
59
- })
59
+ }
60
60
}
61
61
}
62
62
Original file line number Diff line number Diff line change 1
1
apply plugin : ' maven'
2
2
apply plugin : ' signing'
3
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
4
+ signing {
5
+ required { gradle. taskGraph. hasTask(" uploadArchives" ) }
6
+ sign configurations. archives
30
7
}
31
8
32
9
uploadArchives {
@@ -41,8 +18,8 @@ uploadArchives {
41
18
pom. project {
42
19
name " Studyplus Android SDK V2"
43
20
packaging ' aar'
44
- description ' '
45
- artifactId " studyplus-android-sdk "
21
+ description ' Studyplus Android SDK V2 '
22
+ artifactId " studyplus-android-sdk2 "
46
23
url ' https://github.com/studyplus/Studyplus-Android-SDK-V2'
47
24
48
25
scm {
You can’t perform that action at this time.
0 commit comments