-
Notifications
You must be signed in to change notification settings - Fork 38
Prereqs for further development; a more thematic notification sound; improve the OPRs list #861
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
1fish2
wants to merge
7
commits into
the-blue-alliance:master
Choose a base branch
from
1fish2:android-studio-3.1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a prerequisite for updating to newer targetApi levels
and for averting Android Studio warnings about old stuff.
For Android Studio 3.1:
* build tools 27.0.3, gradle 4.4, android gradle 3.1.0
* repositories
* compileSDK 26, JDK 1.8
* Retrolambda is obsolete
* Android support libs. — Not yet guava, firebase, okhttp libs.
Build script changes needed for multidex, applicationVariants.all {},
“compile”, “apt”, … gradle DSL changes.
“flavors” are no longer needed for multiDexEnabled, which is
good because there are incompatible changes to the flavors
features. (build.workaround-missing-resource.gradle
concatenates flavor names for each variant. Hopefully this is
fine when there are no flavors.)
Presumably the updated libraries are backward-compatible.
This needs more testing.
Gradle sync still warns about obsolete/deprecated
configurations 'compile’, 'androidTestApi’, and 'androidTestCompile'
which will go away, but where are any
remaining uses of them?
It’s also higher pitch so it should be easier to hear from phone speakers.
And fix O(N^2) code, even if N = 5.
|
BTW, I just guessed at the updates for |
`./gradlew clean testDebugUnitTest` gets a lot of `NoSuchMethodError: com.google.common.collect.ImmutableSet.copyOf()` exceptions. I didn’t figure that out (multiple guavas on the class path?) but debugging calls for more incremental steps.
This fixes some of the problems.
There are lots of errors `java.util.ServiceConfigurationError:
org.robolectric.internal.ShadowProvider: Provider
org.robolectric.shadows.support.v4.Shadows not a subtype`
which at least in part seems to be due to using a very old version of
Robolectric. Newer versions are compatible with later Android builds,
but they also have API changes. This particular error is supposedly
fixed in release 3.2, but trying to use that got a more basic error (let
alone upgrading to 3.8) that kept any tests from running:
```
DefaultTestRunner.java:26: error: constructor Implementation in class
Implementation cannot be applied to given types;
return new Config.Implementation(
^
required:
int[],int,int,String,String,String,String,String,String,String,Class<?>[
],String[],Class<? extends Application>,String[],Class<?>
found:
int[],String,String,String,String,String,String,String,Class<?>[],String
[],Class<TestTbaAndroid>,String[],Class<CAP#1>
reason: actual and formal argument lists differ in length
where CAP#1 is a fresh type-variable:
CAP#1 extends Object from capture of ?
```
Some of the gradle warnings come from
apply plugin: 'com.facebook.testing.screenshot'
```
WARNING: Configuration 'androidTestCompile' is obsolete and has been
replaced with 'androidTestImplementation'.
It will be removed at the end of 2018
WARNING: Configuration 'androidTestApi' is obsolete and has been
replaced with 'androidTestImplementation'.
It will be removed at the end of 2018
The Task.leftShift(Closure) method has been deprecated and is scheduled
to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at
build_f0nrmj106vzvtku1xoje7yb5h.run(/Users/jerry/dev/the-blue-alliance-a
ndroid/android/build.gradle:4)
(Run with --stacktrace to get the full stack trace of this
deprecation warning.)
The ConfigurableReport.setDestination(Object) method has been
deprecated and is scheduled to be removed in Gradle 5.0. Please use the
method ConfigurableReport.setDestination(File) instead.
at
code_coverage_4nvpfevghf39cb3c8tfyfobgg$_run_closure3$_closure4.doCall(/
Users/jerry/dev/the-blue-alliance-android/code_coverage.gradle:23)
(Run with --stacktrace to get the full stack trace of this
deprecation warning.)
Version: 4.3.0-4+g26b71fb.dirty/4030000
WARNING: Configuration 'compile' is obsolete and has been replaced with
'implementation'.
It will be removed at the end of 2018
registerResGeneratingTask is deprecated, use
registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use
registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use
registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use
registerGeneratedResFolders(FileCollection)
The TaskInternal.execute() method has been deprecated and is scheduled
to be removed in Gradle 5.0. There are better ways to re-use task
logic, see
https://docs.gradle.org/4.4/userguide/custom_tasks.html#sec:reusing_task
_logic.
at
build_workaround_missing_resou_f524m2091rtt3ispqncm4ndf4$_run_closure1$_
closure2.doCall(/Users/jerry/dev/the-blue-alliance-android/android/build
.workaround-missing-resource.gradle:32)
```
Group notification sounds stutter on Oreo, I think because it rate- limits notifications so it starts the new notification then waits a second before starting the group summary notification. The fix requires the new NotificationCompat.Builder#setGroupAlertBehavior method, so this has to update to compileSdkVersion 26 and supportLibVersion 26.1.0. The fix requires some code restructuring since the new method is on NotificationCompat.Builder — no more modifying a built Notification object. There’s more room for refactoring, e.g. set the builder’s title and content text in one place. This restructuring makes it easier to support API 26 notification channels, but I didn’t add that in this commit. Can we do it w/o targeting API 26? (Forget the “easy fix” to the sound stutter. That one breaks the expandable details of summary notifications.) Update the vibration pattern to match the latest sound. [Just to be sure, I re-imported the AndroidStyle.xml file that’s in the project’s root directory. It still reordered imports.] * Event Match Video notifications don’t appear in Recent Notifications. Is that by design? Maybe the inherited getView() method doesn’t work? * Team Match Video notifications don’t appear in the notification shade or Recent Notifications. Ditto on getView()?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
Issues Reference:
Test Plan:
It works on my phone.
Screenshots:
