From f1f2e178228f27cd422e97ad98494dfec57c4d74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Pich?= Date: Thu, 30 Aug 2018 17:22:28 +0200 Subject: [PATCH] Update dependencies --- .circleci/config.yml | 36 ++++----- .gitignore | 30 +++++++- build.gradle | 59 +++++++++------ gradle/wrapper/gradle-wrapper.jar | Bin 54329 -> 54413 bytes gradle/wrapper/gradle-wrapper.properties | 4 +- .../wulkanowy/sdk/interfaces/MobileApi.kt | 2 +- .../wulkanowy/sdk/interfaces/RegisterApi.kt | 2 +- .../sdk/repository/MobileRepository.kt | 6 +- .../sdk/repository/RegisterRepository.kt | 6 +- .../io/github/wulkanowy/sdk/UonetTest.kt | 71 +++++++++--------- 10 files changed, 126 insertions(+), 90 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e12abff9..49c68633 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,37 +4,37 @@ jobs: test: working_directory: ~/sdk docker: - - image: circleci/openjdk:8-jdk-stretch + - image: circleci/openjdk:8-jdk-stretch steps: - - checkout + - checkout - - restore_cache: - key: cache-{{ checksum "build.gradle" }} + - restore_cache: + key: cache-{{ checksum "build.gradle" }} - - run: ./gradlew build -x check --no-daemon --stacktrace --console=plain -PdisablePreDex + - run: ./gradlew build -x check --no-daemon --stacktrace --console=plain -PdisablePreDex - - save_cache: - paths: - - ~/.gradle - key: cache-{{ checksum "build.gradle" }} + - run: ./gradlew check jacocoTestReport --no-daemon --stacktrace --console=plain -PdisablePreDex - - run: ./gradlew check jacocoTestReport --no-daemon --stacktrace --console=plain -PdisablePreDex + - save_cache: + paths: + - ~/.gradle + key: cache-{{ checksum "build.gradle" }} - - run: bash <(curl -s https://codecov.io/bash) + - run: bash <(curl -s https://codecov.io/bash) - - store_test_results: - path: ./build/test-results + - store_test_results: + path: ./build/test-results - - store_artifacts: - path: ./build/reports/jacoco/test + - store_artifacts: + path: ./build/reports/jacoco/test - - store_artifacts: - path: ./build/libs/sdk-0.1.0-SNAPSHOT.jar + - store_artifacts: + path: ./build/libs/sdk-0.1.0-SNAPSHOT.jar workflows: version: 2 test: jobs: - - test + - test diff --git a/.gitignore b/.gitignore index bb57b0ad..d08b97c3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,32 @@ +# Compiled class file +*.class + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +.idea/ + .gradle /build/ +/out/ # Ignore Gradle GUI config gradle-app.setting @@ -13,5 +40,4 @@ gradle-app.setting # # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 # gradle/wrapper/gradle-wrapper.properties -.idea/ -out/ +*iml diff --git a/build.gradle b/build.gradle index 416e3c56..cd147ab8 100644 --- a/build.gradle +++ b/build.gradle @@ -1,24 +1,12 @@ -buildscript { - ext.kotlin_version = '1.2.51' - - repositories { - mavenCentral() - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - plugins { id 'java' + id 'org.jetbrains.kotlin.jvm' version '1.2.61' + id 'jacoco' } group 'io.github.wulkanowy' version '0.1.0-SNAPSHOT' -apply plugin: 'kotlin' -apply plugin: 'jacoco' - sourceCompatibility = 1.8 repositories { @@ -27,21 +15,25 @@ repositories { maven { url "https://jitpack.io" } } +ext { + okhttp3 = "3.11.0" + retrofit = "2.4.0" +} + dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" + implementation 'com.github.VLO-GDA:uonet-sdk:master-SNAPSHOT' - implementation 'com.google.code.gson:gson:2.8.2' - implementation 'com.squareup.retrofit2:retrofit:2.3.0' - implementation 'com.squareup.retrofit2:converter-gson:2.3.0' + implementation 'com.google.code.gson:gson:2.8.5' + implementation "com.squareup.retrofit2:retrofit:$retrofit" + implementation "com.squareup.retrofit2:converter-gson:$retrofit" - implementation 'io.reactivex:rxjava:1.1.6' - implementation 'io.reactivex:rxandroid:1.2.1' - implementation 'com.squareup.retrofit2:adapter-rxjava:2.1.0' - implementation 'com.squareup.okhttp3:logging-interceptor:3.8.0' + implementation "com.squareup.retrofit2:retrofit:$retrofit" + implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofit" + implementation "com.squareup.okhttp3:logging-interceptor:$okhttp3" - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - - testImplementation group: 'junit', name: 'junit', version: '4.12' + testImplementation "junit:junit:4.12" } compileKotlin { @@ -54,6 +46,23 @@ compileTestKotlin { jacocoTestReport { reports { xml.enabled true - html.enabled true } } +test { + testLogging.showStandardStreams = true +} + +task sourcesJar(type: Jar, dependsOn: classes) { + classifier = 'sources' + from sourceSets.main.allSource +} + +task javadocJar(type: Jar, dependsOn: javadoc) { + classifier = 'javadoc' + from javadoc.destinationDir +} + +artifacts { + archives sourcesJar + archives javadocJar +} diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 01b8bf6b1f99cad9213fc495b33ad5bbab8efd20..1948b9074f1016d15d505d185bc3f73deb82d8c8 100644 GIT binary patch delta 7399 zcmY+JWmFVEyv3IV=@jV(>F!z@2@w$K7LZtALE5DjX{1>i=?)12X{2LeX}_~3Zr zS8+Z^CuOc*#vOS(9rx~{;vK=PN*oInvlWewm9q?HBbE;o_x;6zen+o_GVn=8O(eH- z0)EfmN&CUxAA=#~myMvmSzmnLDUQEToNE8Pge)u4hI*|3WS3HwwAbF|+Kkrxy8RW1 z??)%`HVm^w1eCuXP2E{E;f<)3hKM`Oseb8MPK9vsjC>Z*q5_X-j(mtvtlZhGDv)~% z#TB1X$q}_U<3&+j9?ZXp+bva%z-n;_E3-ABH+=ow9qj^ycH5G;~+ zWT)EPw2{$k@s&u(VIx%xn+kMNP@I;Yf$3!`5c#HlLKhh?*t7kx{Cz)1hh0&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+u+C>lj zJj)Gm>iUbE|8B-KM}g=8m723bRDf2_StC+Fap!p{|MQi9LsJC&zmx3$pX4t&Kn>^F KPzU?}WBw1fHw(7_ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 98428ff4..c4bc3b8d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Jun 26 18:52:30 CEST 2018 +#Fri Aug 17 17:01:44 CEST 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-all.zip diff --git a/src/main/kotlin/io/github/wulkanowy/sdk/interfaces/MobileApi.kt b/src/main/kotlin/io/github/wulkanowy/sdk/interfaces/MobileApi.kt index bffa9aba..39ff243b 100644 --- a/src/main/kotlin/io/github/wulkanowy/sdk/interfaces/MobileApi.kt +++ b/src/main/kotlin/io/github/wulkanowy/sdk/interfaces/MobileApi.kt @@ -16,9 +16,9 @@ import io.github.wulkanowy.sdk.notes.Note import io.github.wulkanowy.sdk.notes.NotesRequest import io.github.wulkanowy.sdk.timetable.Lesson import io.github.wulkanowy.sdk.timetable.TimetableRequest +import io.reactivex.Observable import retrofit2.http.Body import retrofit2.http.POST -import rx.Observable interface MobileApi { diff --git a/src/main/kotlin/io/github/wulkanowy/sdk/interfaces/RegisterApi.kt b/src/main/kotlin/io/github/wulkanowy/sdk/interfaces/RegisterApi.kt index 27054cc5..68acbb52 100644 --- a/src/main/kotlin/io/github/wulkanowy/sdk/interfaces/RegisterApi.kt +++ b/src/main/kotlin/io/github/wulkanowy/sdk/interfaces/RegisterApi.kt @@ -5,10 +5,10 @@ import io.github.wulkanowy.sdk.base.ApiResponse import io.github.wulkanowy.sdk.register.CertificateRequest import io.github.wulkanowy.sdk.register.CertificateResponse import io.github.wulkanowy.sdk.register.Student +import io.reactivex.Observable import retrofit2.http.Body import retrofit2.http.Headers import retrofit2.http.POST -import rx.Observable interface RegisterApi { diff --git a/src/main/kotlin/io/github/wulkanowy/sdk/repository/MobileRepository.kt b/src/main/kotlin/io/github/wulkanowy/sdk/repository/MobileRepository.kt index 05ab65c3..c2318409 100644 --- a/src/main/kotlin/io/github/wulkanowy/sdk/repository/MobileRepository.kt +++ b/src/main/kotlin/io/github/wulkanowy/sdk/repository/MobileRepository.kt @@ -18,12 +18,12 @@ import io.github.wulkanowy.sdk.notes.Note import io.github.wulkanowy.sdk.notes.NotesRequest import io.github.wulkanowy.sdk.timetable.Lesson import io.github.wulkanowy.sdk.timetable.TimetableRequest +import io.reactivex.Observable import okhttp3.OkHttpClient import okhttp3.logging.HttpLoggingInterceptor import retrofit2.Retrofit -import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory +import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory import retrofit2.converter.gson.GsonConverterFactory -import rx.Observable class MobileRepository(private val host: String, private val symbol: String, private val signature: String, private val certificate: String, private val reportingUnitSymbol: String) { @@ -62,7 +62,7 @@ class MobileRepository(private val host: String, private val symbol: String, pri private fun getMobileApi(): MobileApi { return Retrofit.Builder() .baseUrl("$host/$symbol/$reportingUnitSymbol/mobile-api/Uczen.v3.Uczen/") - .addCallAdapterFactory(RxJavaCallAdapterFactory.create()) + .addCallAdapterFactory(RxJava2CallAdapterFactory.create()) .addConverterFactory(GsonConverterFactory.create()) .client(OkHttpClient().newBuilder() .addInterceptor(HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY)) diff --git a/src/main/kotlin/io/github/wulkanowy/sdk/repository/RegisterRepository.kt b/src/main/kotlin/io/github/wulkanowy/sdk/repository/RegisterRepository.kt index 5cfa4384..46dc7a04 100644 --- a/src/main/kotlin/io/github/wulkanowy/sdk/repository/RegisterRepository.kt +++ b/src/main/kotlin/io/github/wulkanowy/sdk/repository/RegisterRepository.kt @@ -7,12 +7,12 @@ import io.github.wulkanowy.sdk.interfaces.RegisterApi import io.github.wulkanowy.sdk.register.CertificateRequest import io.github.wulkanowy.sdk.register.CertificateResponse import io.github.wulkanowy.sdk.register.Student +import io.reactivex.Observable import okhttp3.OkHttpClient import okhttp3.logging.HttpLoggingInterceptor import retrofit2.Retrofit -import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory +import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory import retrofit2.converter.gson.GsonConverterFactory -import rx.Observable class RegisterRepository(private val host: String, private val symbol: String, var signature: String = "", var certificate: String = "") { @@ -25,7 +25,7 @@ class RegisterRepository(private val host: String, private val symbol: String, v private fun getRegisterApi(): RegisterApi { return Retrofit.Builder() .baseUrl("$host/$symbol/mobile-api/Uczen.v3.UczenStart/") - .addCallAdapterFactory(RxJavaCallAdapterFactory.create()) + .addCallAdapterFactory(RxJava2CallAdapterFactory.create()) .addConverterFactory(GsonConverterFactory.create()) .client(OkHttpClient().newBuilder() .addInterceptor(HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY)) diff --git a/src/test/kotlin/io/github/wulkanowy/sdk/UonetTest.kt b/src/test/kotlin/io/github/wulkanowy/sdk/UonetTest.kt index ac2f1105..d7eca61c 100644 --- a/src/test/kotlin/io/github/wulkanowy/sdk/UonetTest.kt +++ b/src/test/kotlin/io/github/wulkanowy/sdk/UonetTest.kt @@ -12,9 +12,9 @@ import io.github.wulkanowy.sdk.register.Student import io.github.wulkanowy.sdk.repository.MobileRepository import io.github.wulkanowy.sdk.repository.RegisterRepository import io.github.wulkanowy.sdk.timetable.Lesson +import io.reactivex.observers.TestObserver import junit.framework.TestCase.assertEquals import org.junit.Test -import rx.observers.TestSubscriber const val DEVICE_NAME = "Wulkanowy#client" const val HOST = "https://api.fakelog.cf" @@ -29,85 +29,86 @@ class UonetTest { val register = RegisterRepository(HOST, SYMBOL) val certificate = register.getCertificate(TOKEN, PIN, DEVICE_NAME) - val certSubscriber = TestSubscriber() + val certSubscriber = TestObserver() certificate.subscribe(certSubscriber) - certSubscriber.assertCompleted() + certSubscriber.assertComplete() certSubscriber.assertNoErrors() - assertEquals(false, certSubscriber.onNextEvents[0].isError) - val tokenCrt = certSubscriber.onNextEvents[0].tokenCert + assertEquals(false, certSubscriber.values()[0].isError) + + val tokenCrt = certSubscriber.values()[0].tokenCert register.signature = tokenCrt.certificatePfx register.certificate = tokenCrt.certificateKey val pupils = register.getPupils() - val pupilSubscriber = TestSubscriber>>() + val pupilSubscriber = TestObserver>>() pupils.subscribe(pupilSubscriber) - pupilSubscriber.assertCompleted() + pupilSubscriber.assertComplete() pupilSubscriber.assertNoErrors() - assertEquals("Ok", pupilSubscriber.onNextEvents[0].status) - assertEquals(1, pupilSubscriber.onNextEvents[0].data!!.size) + assertEquals("Ok", pupilSubscriber.values()[0].status) + assertEquals(1, pupilSubscriber.values()[0].data!!.size) - val student = pupilSubscriber.onNextEvents[0].data!![0] + val student = pupilSubscriber.values()[0].data!![0] // MobileRepository val mobile = MobileRepository(HOST, SYMBOL, register.signature, register.certificate, student.reportingUnitSymbol) val start = mobile.logStart() - val startSubscriber = TestSubscriber>() + val startSubscriber = TestObserver>() start.subscribe(startSubscriber) - startSubscriber.assertCompleted() + startSubscriber.assertComplete() startSubscriber.assertNoErrors() - assertEquals("Ok", startSubscriber.onNextEvents[0].status) + assertEquals("Ok", startSubscriber.values()[0].status) val dictionaries = mobile.getDictionaries(student.userLoginId, student.classificationPeriodId, student.classId) - val dictionariesSubscriber = TestSubscriber>() + val dictionariesSubscriber = TestObserver>() dictionaries.subscribe(dictionariesSubscriber) - dictionariesSubscriber.assertCompleted() + dictionariesSubscriber.assertComplete() dictionariesSubscriber.assertNoErrors() - assertEquals("Ok", dictionariesSubscriber.onNextEvents[0].status) + assertEquals("Ok", dictionariesSubscriber.values()[0].status) val lessons = mobile.getTimetable("2018-04-23", "2018-04-24", student.classId, student.classificationPeriodId, student.id) - val lessonsSubscriber = TestSubscriber>>() + val lessonsSubscriber = TestObserver>>() lessons.subscribe(lessonsSubscriber) - lessonsSubscriber.assertCompleted() + lessonsSubscriber.assertComplete() lessonsSubscriber.assertNoErrors() - assertEquals("Ok", lessonsSubscriber.onNextEvents[0].status) + assertEquals("Ok", lessonsSubscriber.values()[0].status) val grades = mobile.getGrades(student.classId, student.classificationPeriodId, student.id) - val gradesSubscriber = TestSubscriber>>() + val gradesSubscriber = TestObserver>>() grades.subscribe(gradesSubscriber) - gradesSubscriber.assertCompleted() + gradesSubscriber.assertComplete() gradesSubscriber.assertNoErrors() - assertEquals("Ok", gradesSubscriber.onNextEvents[0].status) + assertEquals("Ok", gradesSubscriber.values()[0].status) val exams = mobile.getExams("2018-05-28", "2018-06-03", student.classId, student.classificationPeriodId, student.id) - val examsSubscriber = TestSubscriber>>() + val examsSubscriber = TestObserver>>() exams.subscribe(examsSubscriber) - examsSubscriber.assertCompleted() + examsSubscriber.assertComplete() examsSubscriber.assertNoErrors() - assertEquals("Ok", examsSubscriber.onNextEvents[0].status) + assertEquals("Ok", examsSubscriber.values()[0].status) val notes = mobile.getNotes(student.classificationPeriodId, student.id) - val notesSubscriber = TestSubscriber>>() + val notesSubscriber = TestObserver>>() notes.subscribe(notesSubscriber) - notesSubscriber.assertCompleted() + notesSubscriber.assertComplete() notesSubscriber.assertNoErrors() - assertEquals("Ok", notesSubscriber.onNextEvents[0].status) + assertEquals("Ok", notesSubscriber.values()[0].status) val attendance = mobile.getAttendance("2018-04-23", "2018-04-24", student.classId, student.classificationPeriodId, student.id) - val attendanceSubscriber = TestSubscriber>() + val attendanceSubscriber = TestObserver>() attendance.subscribe(attendanceSubscriber) - attendanceSubscriber.assertCompleted() + attendanceSubscriber.assertComplete() attendanceSubscriber.assertNoErrors() - assertEquals("Ok", attendanceSubscriber.onNextEvents[0].status) - assertEquals("2018-04-23", attendanceSubscriber.onNextEvents[0].data!!.dateStartText) + assertEquals("Ok", attendanceSubscriber.values()[0].status) + assertEquals("2018-04-23", attendanceSubscriber.values()[0].data!!.dateStartText) val homework = mobile.getHomework("2017-10-23", "2017-10-27", student.classId, student.classificationPeriodId, student.id) - val homeworkSubscriber = TestSubscriber>>() + val homeworkSubscriber = TestObserver>>() homework.subscribe(homeworkSubscriber) - homeworkSubscriber.assertCompleted() + homeworkSubscriber.assertComplete() homeworkSubscriber.assertNoErrors() - assertEquals("Ok", homeworkSubscriber.onNextEvents[0].status) + assertEquals("Ok", homeworkSubscriber.values()[0].status) } }