mirror of
https://github.com/tateisu/SubwayTooter
synced 2025-01-10 16:34:41 +01:00
- Android Studio:3.4.2
- Kotlin 1.3.41 - kotlinx.coroutines 1.2.2 - com.android.tools.build:gradle:3.4.2 - firebase-core:17.0.0 - firebase-messaging:19.0.1 - androidx.annotation:annotation:1.1.0 - org.conscrypt:conscrypt-android:2.1.0 - io.github.inflationx:calligraphy3:3.1.1 - io.github.inflationx:viewpump:2.0.3 - com.github.woxthebox:draglistview:1.6.6 - com.github.kenglxn.QRGen:android:2.5.0 - com.caverock:androidsvg-aar:1.4 - com.google.android.exoplayer:exoplayer:2.10.2 (this requires targetCompatibility JavaVersion.VERSION_1_8) - targetCompatibility JavaVersion.VERSION_1_8 - kotlin-stdlib-jdk7 => kotlin-stdlib
This commit is contained in:
parent
f84a200ce0
commit
9b4ffd65c1
@ -4,7 +4,7 @@ apply plugin: 'kotlin'
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
//noinspection DifferentStdlibGradleVersion
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
|
||||
testImplementation group: 'junit', name: 'junit', version: '4.12'
|
||||
}
|
||||
|
@ -29,13 +29,13 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test:runner:1.2.0-alpha05'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-alpha05'
|
||||
androidTestImplementation 'androidx.test:runner:1.3.0-alpha01'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha01'
|
||||
|
||||
api project(':apng')
|
||||
// 'api' に指定した依存関係はこのライブラリの利用者に公開されます
|
||||
// 'implementation' に指定した依存関係はこのライブラリの利用者に公開されません
|
||||
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
@ -9,6 +9,14 @@ android {
|
||||
|
||||
compileSdkVersion target_sdk_version
|
||||
|
||||
// exoplayer 2.9.0 以降は Java 8 compiler support を要求する
|
||||
// https://github.com/google/ExoPlayer/blob/release-v2/RELEASENOTES.md
|
||||
// Invoke-customs are only supported starting with Android O (--min-api 26)
|
||||
// Default interface methods are only supported starting with Android N (--min-api 24)
|
||||
compileOptions {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
targetSdkVersion target_sdk_version
|
||||
minSdkVersion min_sdk_version
|
||||
@ -89,10 +97,10 @@ dependencies {
|
||||
implementation "com.google.android.material:material:$androidx_version"
|
||||
|
||||
// https://firebase.google.com/support/release-notes/android
|
||||
implementation "com.google.firebase:firebase-core:16.0.8"
|
||||
implementation "com.google.firebase:firebase-messaging:17.6.0"
|
||||
implementation "com.google.firebase:firebase-core:17.0.0"
|
||||
implementation "com.google.firebase:firebase-messaging:19.0.1"
|
||||
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
||||
testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinx_coroutines_version"
|
||||
@ -118,18 +126,19 @@ dependencies {
|
||||
implementation 'com.github.bumptech.glide:okhttp3-integration:4.9.0'
|
||||
implementation 'com.github.bumptech.glide:annotations:4.9.0'
|
||||
// kotlin では annotationProcessor の代わりに kapt を使う
|
||||
kapt 'androidx.annotation:annotation:1.0.2'
|
||||
kapt 'androidx.annotation:annotation:1.1.0'
|
||||
kapt 'com.github.bumptech.glide:compiler:4.9.0'
|
||||
|
||||
implementation "org.conscrypt:conscrypt-android:1.3.0"
|
||||
implementation "org.conscrypt:conscrypt-android:2.1.0"
|
||||
|
||||
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
|
||||
implementation 'io.github.inflationx:calligraphy3:3.1.1'
|
||||
implementation 'io.github.inflationx:viewpump:2.0.3'
|
||||
|
||||
implementation 'com.github.woxthebox:draglistview:1.6.3'
|
||||
implementation 'com.github.woxthebox:draglistview:1.6.6'
|
||||
|
||||
implementation 'com.github.omadahealth:swipy:1.2.3@aar'
|
||||
|
||||
implementation 'com.github.kenglxn.QRGen:android:2.4.0'
|
||||
implementation 'com.github.kenglxn.QRGen:android:2.5.0'
|
||||
|
||||
implementation 'commons-io:commons-io:2.6'
|
||||
|
||||
@ -139,14 +148,11 @@ dependencies {
|
||||
|
||||
implementation 'com.astuetz:pagerslidingtabstrip:1.0.1'
|
||||
|
||||
// exoplayer 2.9.0 は Java 8 compiler support を要求する
|
||||
implementation 'com.google.android.exoplayer:exoplayer:2.8.4'
|
||||
|
||||
// implementation 'com.simplecityapps:recyclerview-fastscroll:1.0.16'
|
||||
implementation 'com.google.android.exoplayer:exoplayer:2.10.2'
|
||||
|
||||
implementation 'me.drakeet.support:toastcompat:1.0.2'
|
||||
|
||||
implementation 'com.caverock:androidsvg-aar:1.3'
|
||||
implementation 'com.caverock:androidsvg-aar:1.4'
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
@ -21,7 +21,7 @@ import android.view.Window
|
||||
import android.widget.TextView
|
||||
import com.google.android.exoplayer2.*
|
||||
import com.google.android.exoplayer2.extractor.DefaultExtractorsFactory
|
||||
import com.google.android.exoplayer2.source.ExtractorMediaSource
|
||||
import com.google.android.exoplayer2.source.ProgressiveMediaSource
|
||||
import com.google.android.exoplayer2.source.MediaSource
|
||||
import com.google.android.exoplayer2.source.MediaSourceEventListener
|
||||
import com.google.android.exoplayer2.source.TrackGroupArray
|
||||
@ -348,15 +348,14 @@ class ActMediaViewer : AppCompatActivity(), View.OnClickListener {
|
||||
|
||||
exoView.visibility = View.VISIBLE
|
||||
|
||||
val defaultBandwidthMeter = DefaultBandwidthMeter()
|
||||
val defaultBandwidthMeter = DefaultBandwidthMeter.Builder(this).build()
|
||||
val extractorsFactory = DefaultExtractorsFactory()
|
||||
|
||||
val dataSourceFactory = DefaultDataSourceFactory(
|
||||
this, Util.getUserAgent(this, getString(R.string.app_name)), defaultBandwidthMeter
|
||||
)
|
||||
|
||||
val mediaSource = ExtractorMediaSource.Factory(dataSourceFactory)
|
||||
.setExtractorsFactory(extractorsFactory)
|
||||
val mediaSource = ProgressiveMediaSource.Factory(dataSourceFactory,extractorsFactory)
|
||||
.createMediaSource(url.toUri())
|
||||
|
||||
mediaSource.addEventListener(App1.getAppState(this).handler, mediaSourceEventListener)
|
||||
|
@ -1,20 +1,24 @@
|
||||
package jp.juggler.util
|
||||
|
||||
import android.graphics.Typeface
|
||||
import io.github.inflationx.calligraphy3.CalligraphyConfig
|
||||
import io.github.inflationx.calligraphy3.CalligraphyInterceptor
|
||||
import io.github.inflationx.calligraphy3.CalligraphyTypefaceSpan
|
||||
import io.github.inflationx.viewpump.ViewPump
|
||||
import jp.juggler.subwaytooter.R
|
||||
import uk.co.chrisjenx.calligraphy.CalligraphyConfig
|
||||
import uk.co.chrisjenx.calligraphy.CalligraphyTypefaceSpan
|
||||
|
||||
//import uk.co.chrisjenx.calligraphy.CalligraphyConfig
|
||||
//import uk.co.chrisjenx.calligraphy.CalligraphyTypefaceSpan
|
||||
|
||||
fun initializeFont(){
|
||||
CalligraphyConfig.initDefault(
|
||||
CalligraphyConfig.Builder()
|
||||
.setFontAttrId(R.attr.fontPath)
|
||||
fun initializeFont() {
|
||||
ViewPump.init(
|
||||
ViewPump.builder()
|
||||
.addInterceptor(
|
||||
CalligraphyInterceptor(
|
||||
CalligraphyConfig.Builder()
|
||||
.setFontAttrId(R.attr.fontPath)
|
||||
.build()
|
||||
)
|
||||
)
|
||||
.build()
|
||||
)
|
||||
}
|
||||
|
||||
fun fontSpan(tf : Typeface) : Any = CalligraphyTypefaceSpan(tf)
|
||||
|
||||
|
17
build.gradle
17
build.gradle
@ -5,8 +5,8 @@ buildscript {
|
||||
ext.androidx_version= '1.0.0'
|
||||
ext.appcompat_version='1.0.2'
|
||||
|
||||
ext.kotlin_version = '1.3.31'
|
||||
ext.kotlinx_coroutines_version = '1.2.1'
|
||||
ext.kotlin_version = '1.3.41'
|
||||
ext.kotlinx_coroutines_version = '1.2.2'
|
||||
ext.anko_version='0.10.8'
|
||||
|
||||
repositories {
|
||||
@ -16,15 +16,12 @@ buildscript {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.4.0'
|
||||
classpath 'com.android.tools.build:gradle:3.4.2'
|
||||
classpath 'com.google.gms:google-services:4.2.0'
|
||||
// https://android-developers.googleblog.com/2018/05/announcing-new-sdk-versioning.html では
|
||||
// com.google.gms:google-services:3.3.0 以降を使うように書いてあるんだけど、3.3.0にするとGradle sync に失敗する。
|
||||
// エラーメッセージに特徴的な部分がなく原因はよく分からなかった。
|
||||
// https://developers.google.com/android/guides/google-services-plugin のドキュメントだと3.2.1と書かれてるし、暫く待つかなあ…
|
||||
// 関連
|
||||
// https://stackoverflow.com/questions/50166102/gradle-project-sync-failing-after-google-announced-the-new-sdk-versioning-system
|
||||
// https://issuetracker.google.com/issues/79122163
|
||||
// com.google.gms:google-services:4.3.0 は
|
||||
// 警告 API 'variant.getMergeResources()' is obsolete and has been replaced with 'variant.getMergeResourcesProvider()'.
|
||||
// を出す。
|
||||
|
||||
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
// kotlin 1.3.0 を入れるとIDEがindex作成でエラーを繰り返し出すようになるので様子見する
|
||||
|
@ -29,12 +29,6 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
experimental {
|
||||
coroutines 'enable'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
@ -42,10 +36,10 @@ dependencies {
|
||||
|
||||
implementation "androidx.appcompat:appcompat:$appcompat_version"
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test:runner:1.2.0-alpha03'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-alpha03'
|
||||
androidTestImplementation 'androidx.test:runner:1.3.0-alpha01'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha01'
|
||||
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinx_coroutines_version"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlinx_coroutines_version"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user