Skip to content
This repository has been archived by the owner on Mar 16, 2021. It is now read-only.

Commit

Permalink
Merge pull request #203 from grandcentrix/feature/increase_appcompat_…
Browse files Browse the repository at this point in the history
…to_1_1_0

Increase AppCompat Version to 1.1.0 and JUnit to 4.13
  • Loading branch information
jannisveerkamp authored Jan 28, 2020
2 parents 1019a48 + 05ca2de commit 887bcf5
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 57 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,18 @@ ext {
TARGET_SDK_VERSION = 28
COMPILE_SDK_VERSION = 28

androidXAppCompatVersion = '1.0.2'
androidXAppCompatVersion = '1.1.0'
androidXAnnotationVersion = '1.1.0'
androidXTestRunnerVersion = '1.2.0'
junitVersion = '4.12'
junitVersion = '4.13'
mockitoVersion = '2.28.2'
mockitoKotlinVersion = '1.6.0'
assertjVersion = '2.9.1'

// According to https://github.com/googlesamples/android-custom-lint-rules/tree/master/android-studio-3
// the lint version should match to the used Android Gradle Plugin by the formula "AGP Version X.Y.Z + 23.0.0"
// E.g. "AGP Version 3.1.3 + 23.0.0 = Lint Version 26.1.3"
lintVersion = '26.3.2'
lintVersion = '26.4.2'
}

allprojects {
Expand Down
19 changes: 1 addition & 18 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,7 @@ android {
targetSdkVersion TARGET_SDK_VERSION
versionCode 1
versionName "1.0"
}
buildTypes {
debug {
// only use the build in shrinker for debug builds, don't obfuscate
// remove unused classes and to make sure the proguard config is correct
// http://tools.android.com/tech-docs/new-build-system/built-in-shrinker
// https://developer.android.com/studio/build/shrink-code.html#shrink-code
minifyEnabled true
// using the build in shrinker only works with proguard disabled
// https://developer.android.com/studio/build/shrink-code.html#gradle-shrinker
useProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
// use real proguard for release builds, not the build in shrinker which doesn't support obfuscation
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
lintOptions {
abortOnError false
Expand Down
17 changes: 0 additions & 17 deletions sample/proguard-rules.pro

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ abstract class TestFragment : TiFragment<TestPresenter, TestPresenter.TestView>(
instanceNum = testFragmentInstanceCount
}

override fun onAttach(context: Context?) {
override fun onAttach(context: Context) {
addedState.startWith(false).distinctUntilChanged().skip(1)
.subscribe { added -> Log.d(TAG, "fragment$instanceNum.setAdded($added)") }
detachedState.startWith(false).distinctUntilChanged().skip(1)
Expand Down Expand Up @@ -241,22 +241,22 @@ abstract class TestFragment : TiFragment<TestPresenter, TestPresenter.TestView>(
Log.v(TAG, "onAttachFragment")
}

override fun onConfigurationChanged(newConfig: Configuration?) {
override fun onConfigurationChanged(newConfig: Configuration) {
super.onConfigurationChanged(newConfig)
Log.v(TAG, "onConfigurationChanged")
}

override fun onContextItemSelected(item: MenuItem?): Boolean {
override fun onContextItemSelected(item: MenuItem): Boolean {
Log.v(TAG, "onContextItemSelected")
return super.onContextItemSelected(item)
}

override fun onCreateContextMenu(menu: ContextMenu, v: View, menuInfo: ContextMenu.ContextMenuInfo) {
override fun onCreateContextMenu(menu: ContextMenu, v: View, menuInfo: ContextMenu.ContextMenuInfo?) {
super.onCreateContextMenu(menu, v, menuInfo)
Log.v(TAG, "onCreateContextMenu")
}

override fun onCreateOptionsMenu(menu: Menu?, inflater: MenuInflater?) {
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
super.onCreateOptionsMenu(menu, inflater)
Log.v(TAG, "onCreateOptionsMenu")
}
Expand All @@ -271,8 +271,7 @@ abstract class TestFragment : TiFragment<TestPresenter, TestPresenter.TestView>(
Log.v(TAG, "onHiddenChanged")
}

override fun onInflate(context: Context?, attrs: AttributeSet,
savedInstanceState: Bundle) {
override fun onInflate(context: Context, attrs: AttributeSet, savedInstanceState: Bundle?) {
super.onInflate(context, attrs, savedInstanceState)
Log.v(TAG, "onInflate")
}
Expand All @@ -289,12 +288,12 @@ abstract class TestFragment : TiFragment<TestPresenter, TestPresenter.TestView>(
printState()
}

override fun onOptionsItemSelected(item: MenuItem?): Boolean {
override fun onOptionsItemSelected(item: MenuItem): Boolean {
Log.v(TAG, "onOptionsItemSelected")
return super.onOptionsItemSelected(item)
}

override fun onOptionsMenuClosed(menu: Menu?) {
override fun onOptionsMenuClosed(menu: Menu) {
super.onOptionsMenuClosed(menu)
Log.v(TAG, "onOptionsMenuClosed")
}
Expand All @@ -305,7 +304,7 @@ abstract class TestFragment : TiFragment<TestPresenter, TestPresenter.TestView>(
printState()
}

override fun onPrepareOptionsMenu(menu: Menu?) {
override fun onPrepareOptionsMenu(menu: Menu) {
super.onPrepareOptionsMenu(menu)
Log.v(TAG, "onPrepareOptionsMenu")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ class MissingViewInCompositeDetectorTest : LintDetectorTest() {

override fun getDetector(): Detector = MissingViewInCompositeDetector()

override fun getIssues(): MutableList<Issue> = mutableListOf(
MissingViewInCompositeDetector.ISSUE)
override fun getIssues(): MutableList<Issue> = mutableListOf(MissingViewInCompositeDetector.ISSUE)

/*
override fun allowMissingSdk(): Boolean = true
/*
* --------------------------------------------------------------------------------
* CompositeActivity
* --------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ class MissingViewInThirtyInchDetectorTest : LintDetectorTest() {

override fun getDetector(): Detector = MissingViewInThirtyInchDetector()

override fun getIssues(): MutableList<Issue> = mutableListOf(
MissingViewInThirtyInchDetector.ISSUE)
override fun getIssues(): MutableList<Issue> = mutableListOf(MissingViewInThirtyInchDetector.ISSUE)

override fun allowMissingSdk(): Boolean = true

/*
* --------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ protected void onStop() {

@CallSuper
@Override
protected void onSaveInstanceState(final Bundle outState) {
protected void onSaveInstanceState(@NonNull final Bundle outState) {
super.onSaveInstanceState(outState);
mDelegate.onSaveInstanceState_afterSuper(outState);
}
Expand Down Expand Up @@ -191,7 +191,7 @@ public final boolean isActivityFinishing() {

@CallSuper
@Override
public void onConfigurationChanged(final Configuration newConfig) {
public void onConfigurationChanged(@NonNull final Configuration newConfig) {
super.onConfigurationChanged(newConfig);
mDelegate.onConfigurationChanged_afterSuper(newConfig);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public void onCreate(final Bundle savedInstanceState) {
@CallSuper
@Nullable
@Override
public View onCreateView(final LayoutInflater inflater, @Nullable final ViewGroup container,
public View onCreateView(@NonNull final LayoutInflater inflater, @Nullable final ViewGroup container,
@Nullable final Bundle savedInstanceState) {
mDelegate.onCreateView_beforeSuper(inflater, container, savedInstanceState);
return super.onCreateView(inflater, container, savedInstanceState);
Expand All @@ -150,7 +150,7 @@ public void onStop() {

@CallSuper
@Override
public void onSaveInstanceState(final Bundle outState) {
public void onSaveInstanceState(@NonNull final Bundle outState) {
super.onSaveInstanceState(outState);
mDelegate.onSaveInstanceState_afterSuper(outState);
}
Expand Down

0 comments on commit 887bcf5

Please sign in to comment.