Merge pull request #4668 from k9mail/upgrade

Upgrade dependencies + build tools
This commit is contained in:
cketti 2020-04-16 02:32:02 +02:00 committed by GitHub
commit 3459ab5267
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 37 additions and 33 deletions

View file

@ -21,7 +21,7 @@ dependencies {
implementation "androidx.work:work-runtime-ktx:${versions.androidxWorkManager}"
implementation "androidx.fragment:fragment:${versions.androidxFragment}"
implementation "androidx.localbroadcastmanager:localbroadcastmanager:${versions.androidxLocalBroadcastManager}"
implementation "org.jsoup:jsoup:1.11.2"
implementation "org.jsoup:jsoup:1.13.1"
implementation "com.squareup.moshi:moshi:${versions.moshi}"
implementation "com.jakewharton.timber:timber:${versions.timber}"
implementation "org.apache.james:apache-mime4j-core:${versions.mime4j}"

View file

@ -27,8 +27,7 @@ class HeadCleaner {
private void copySafeNodes(Element source, Element destination) {
CleaningVisitor cleaningVisitor = new CleaningVisitor(source, destination);
NodeTraversor traversor = new NodeTraversor(cleaningVisitor);
traversor.traverse(source);
NodeTraversor.traverse(cleaningVisitor, source);
}
@ -63,11 +62,11 @@ class HeadCleaner {
}
} else if (source instanceof TextNode) {
TextNode sourceText = (TextNode) source;
TextNode destinationText = new TextNode(sourceText.getWholeText(), source.baseUri());
TextNode destinationText = new TextNode(sourceText.getWholeText());
destination.appendChild(destinationText);
} else if (source instanceof DataNode && isSafeTag(source.parent())) {
DataNode sourceData = (DataNode) source;
DataNode destinationData = new DataNode(sourceData.getWholeData(), source.baseUri());
DataNode destinationData = new DataNode(sourceData.getWholeData());
destination.appendChild(destinationData);
}
}

View file

@ -17,6 +17,7 @@ dependencies {
implementation project(':plugins:openpgp-api-lib:openpgp-api')
implementation "androidx.appcompat:appcompat:${versions.androidxAppCompat}"
implementation "androidx.preference:preference:${versions.androidxPreference}"
implementation "com.takisoft.preferencex:preferencex:${versions.preferencesFix}"
implementation "com.takisoft.preferencex:preferencex-datetimepicker:${versions.preferencesFix}"
implementation "com.takisoft.preferencex:preferencex-colorpicker:${versions.preferencesFix}"
@ -34,21 +35,21 @@ dependencies {
implementation "com.splitwise:tokenautocomplete:2.0.7"
implementation "de.cketti.safecontentresolver:safe-content-resolver-v21:0.9.0"
implementation "com.github.amlcurran.showcaseview:library:5.4.1"
implementation "com.xwray:groupie:2.3.0"
implementation "com.xwray:groupie-kotlin-android-extensions:2.3.0"
implementation "com.xwray:groupie:2.8.0"
implementation "com.xwray:groupie-kotlin-android-extensions:2.8.0"
implementation 'com.mikepenz:materialdrawer:7.0.0'
implementation 'com.mikepenz:fontawesome-typeface:5.9.0.0-kotlin@aar'
implementation 'com.github.ByteHamster:SearchPreference:v2.0.0'
implementation 'com.mikepenz:fastadapter:4.1.2'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation "commons-io:commons-io:${versions.commonsIo}"
implementation "androidx.core:core-ktx:${versions.coreKtx}"
implementation "net.jcip:jcip-annotations:1.0"
implementation "com.jakewharton.timber:timber:${versions.timber}"
implementation "org.apache.james:apache-mime4j-core:${versions.mime4j}"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.5"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.5"
testImplementation project(':mail:testing')
testImplementation project(':app:storage')

View file

@ -2,15 +2,15 @@ package com.fsck.k9.ui.settings
import com.fsck.k9.Account
import com.fsck.k9.ui.R
import com.xwray.groupie.kotlinandroidextensions.GroupieViewHolder
import com.xwray.groupie.kotlinandroidextensions.Item
import com.xwray.groupie.kotlinandroidextensions.ViewHolder
import kotlinx.android.synthetic.main.account_list_item.*
internal class AccountItem(val account: Account) : Item() {
override fun getLayout(): Int = R.layout.account_list_item
override fun bind(viewHolder: ViewHolder, position: Int) {
override fun bind(viewHolder: GroupieViewHolder, position: Int) {
viewHolder.name.text = account.description
viewHolder.email.text = account.email
}

View file

@ -3,15 +3,15 @@ package com.fsck.k9.ui.settings
import android.util.TypedValue
import androidx.annotation.IdRes
import com.fsck.k9.ui.R
import com.xwray.groupie.kotlinandroidextensions.GroupieViewHolder
import com.xwray.groupie.kotlinandroidextensions.Item
import com.xwray.groupie.kotlinandroidextensions.ViewHolder
import kotlinx.android.synthetic.main.text_icon_list_item.*
internal class SettingsActionItem(val text: String, @IdRes val navigationAction: Int, val icon: Int) : Item() {
override fun getLayout(): Int = R.layout.text_icon_list_item
override fun bind(viewHolder: ViewHolder, position: Int) {
override fun bind(viewHolder: GroupieViewHolder, position: Int) {
viewHolder.text.text = text
val outValue = TypedValue()

View file

@ -1,14 +1,14 @@
package com.fsck.k9.ui.settings
import com.fsck.k9.ui.R
import com.xwray.groupie.kotlinandroidextensions.GroupieViewHolder
import com.xwray.groupie.kotlinandroidextensions.Item
import com.xwray.groupie.kotlinandroidextensions.ViewHolder
import kotlinx.android.synthetic.main.text_divider_list_item.*
internal class SettingsDividerItem(val text: String) : Item() {
override fun getLayout(): Int = R.layout.text_divider_list_item
override fun bind(viewHolder: ViewHolder, position: Int) {
override fun bind(viewHolder: GroupieViewHolder, position: Int) {
viewHolder.text.text = text
}
}

View file

@ -14,14 +14,14 @@ import com.fsck.k9.ui.settings.account.AccountSettingsActivity
import com.xwray.groupie.GroupAdapter
import com.xwray.groupie.Item
import com.xwray.groupie.Section
import com.xwray.groupie.kotlinandroidextensions.ViewHolder
import com.xwray.groupie.kotlinandroidextensions.GroupieViewHolder
import kotlinx.android.synthetic.main.fragment_settings_list.*
import org.koin.androidx.viewmodel.ext.android.viewModel
class SettingsListFragment : Fragment() {
private val viewModel: SettingsViewModel by viewModel()
private lateinit var settingsAdapter: GroupAdapter<ViewHolder>
private lateinit var settingsAdapter: GroupAdapter<GroupieViewHolder>
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
return inflater.inflate(R.layout.fragment_settings_list, container, false)

View file

@ -4,37 +4,38 @@ buildscript {
'compileSdk': 29,
'targetSdk': 28,
'minSdk': 21,
'buildTools': '29.0.2',
'buildTools': '29.0.3',
'robolectricSdk': 28
]
versions = [
'kotlin': '1.3.61',
'androidxAppCompat': '1.2.0-alpha02',
'kotlin': '1.3.72',
'androidxAppCompat': '1.2.0-beta01',
'androidxRecyclerView': '1.1.0',
'androidxLifecycle': '2.2.0',
'androidxAnnotation': '1.1.0',
'androidxNavigation': '2.2.1',
'androidxNavigation': '2.2.2',
'androidxConstraintLayout': '1.1.3',
'androidxWorkManager': '2.3.1',
'androidxFragment': '1.2.1',
'androidxWorkManager': '2.3.4',
'androidxFragment': '1.2.4',
'androidxLocalBroadcastManager': '1.0.0',
'androidxCore': '1.2.0',
'androidxCardView': '1.0.0',
'androidxPreference': '1.1.1',
'materialComponents': '1.1.0',
'preferencesFix': '1.1.0',
'okio': '2.4.3',
'okio': '2.5.0',
'moshi': '1.9.2',
'timber': '4.5.1',
'koin': '2.1.1',
'timber': '4.7.1',
'koin': '2.1.5',
'commonsIo': '2.6',
'mime4j': '0.8.1',
'okhttp': '4.2.1',
'okhttp': '4.5.0',
'androidxTestRunner': '1.1.1',
'junit': '4.12',
'junit': '4.13',
'robolectric': '4.2.1',
'mockito': '3.2.4',
'mockito': '3.3.3',
'mockitoKotlin': '2.2.0',
'truth': '1.0.1'
]
@ -51,10 +52,10 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.android.tools.build:gradle:3.6.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:${versions.kotlin}"
classpath "org.jlleitschuh.gradle:ktlint-gradle:9.1.1"
classpath "org.jlleitschuh.gradle:ktlint-gradle:9.2.1"
}
}

Binary file not shown.

View file

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

3
gradlew.bat vendored
View file

@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"