Skip to content

Commit

Permalink
release: version bump, minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
warren-bank committed May 12, 2019
1 parent 11e4a05 commit d17ed90
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 80 deletions.
35 changes: 18 additions & 17 deletions WebCast/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ android {
buildToolsVersion project.ext.buildToolsVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility project.ext.javaVersion
targetCompatibility project.ext.javaVersion
}

defaultConfig {
versionName project.ext.releaseVersion
versionCode project.ext.releaseVersionCode
minSdkVersion project.ext.minSdkVersion
targetSdkVersion project.ext.targetSdkVersion

applicationId "com.github.warren_bank.webcast"
versionName project.ext.releaseVersion
versionCode project.ext.releaseVersionCode
}

buildTypes {
Expand Down Expand Up @@ -46,27 +46,28 @@ android {
}

lintOptions {
// The demo app does not have translations.
disable 'MissingTranslation'
abortOnError true
}
}

dependencies {
implementation 'com.android.support:support-v4:' + project.ext.supportLibraryVersion // https://mvnrepository.com/artifact/com.android.support/support-v4?repo=google
implementation 'com.android.support:appcompat-v7:' + project.ext.supportLibraryVersion // https://mvnrepository.com/artifact/com.android.support/appcompat-v7?repo=google
implementation 'com.android.support:recyclerview-v7:' + project.ext.supportLibraryVersion // https://mvnrepository.com/artifact/com.android.support/recyclerview-v7?repo=google
implementation 'com.android.support:design:' + project.ext.supportLibraryVersion // https://mvnrepository.com/artifact/com.android.support/design?repo=google
implementation 'com.android.support:appcompat-v7:' + project.ext.supportLibraryVersion // ( 1 MB) https://mvnrepository.com/artifact/com.android.support/appcompat-v7?repo=google
implementation 'com.android.support:recyclerview-v7:' + project.ext.supportLibraryVersion // (347 KB) https://mvnrepository.com/artifact/com.android.support/recyclerview-v7?repo=google
implementation 'com.android.support:design:' + project.ext.supportLibraryVersion // (566 KB) https://mvnrepository.com/artifact/com.android.support/design?repo=google
implementation 'com.android.support:support-compat:' + project.ext.supportLibraryVersion // (606 KB) https://mvnrepository.com/artifact/com.android.support/support-compat?repo=google
implementation 'com.android.support:support-v4:' + project.ext.supportLibraryVersion // ( 3 KB) https://mvnrepository.com/artifact/com.android.support/support-v4?repo=google

implementation 'com.android.support.constraint:constraint-layout:' + '1.1.3' // https://mvnrepository.com/artifact/com.android.support.constraint/constraint-layout?repo=google
implementation 'com.android.support.constraint:constraint-layout:' + '1.1.3' // ( 63 KB) https://mvnrepository.com/artifact/com.android.support.constraint/constraint-layout?repo=google

implementation 'com.google.android.exoplayer:exoplayer-core:' + project.ext.exoPlayerVersion // https://mvnrepository.com/artifact/com.google.android.exoplayer/exoplayer-core?repo=jcenter
implementation 'com.google.android.exoplayer:exoplayer-dash:' + project.ext.exoPlayerVersion // https://mvnrepository.com/artifact/com.google.android.exoplayer/exoplayer-dash?repo=jcenter
implementation 'com.google.android.exoplayer:exoplayer-hls:' + project.ext.exoPlayerVersion // https://mvnrepository.com/artifact/com.google.android.exoplayer/exoplayer-hls?repo=jcenter
implementation 'com.google.android.exoplayer:exoplayer-smoothstreaming:' + project.ext.exoPlayerVersion // https://mvnrepository.com/artifact/com.google.android.exoplayer/exoplayer-smoothstreaming?repo=jcenter
implementation 'com.google.android.exoplayer:exoplayer-ui:' + project.ext.exoPlayerVersion // https://mvnrepository.com/artifact/com.google.android.exoplayer/exoplayer-ui?repo=jcenter
implementation 'com.google.android.exoplayer:extension-cast:' + project.ext.exoPlayerVersion // https://mvnrepository.com/artifact/com.google.android.exoplayer/extension-cast?repo=jcenter
implementation 'com.google.android.exoplayer:exoplayer-core:' + project.ext.exoPlayerVersion // (1.3 MB) https://mvnrepository.com/artifact/com.google.android.exoplayer/exoplayer-core?repo=jcenter
implementation 'com.google.android.exoplayer:exoplayer-dash:' + project.ext.exoPlayerVersion // (107 KB) https://mvnrepository.com/artifact/com.google.android.exoplayer/exoplayer-dash?repo=jcenter
implementation 'com.google.android.exoplayer:exoplayer-hls:' + project.ext.exoPlayerVersion // ( 98 KB) https://mvnrepository.com/artifact/com.google.android.exoplayer/exoplayer-hls?repo=jcenter
implementation 'com.google.android.exoplayer:exoplayer-smoothstreaming:' + project.ext.exoPlayerVersion // ( 44 KB) https://mvnrepository.com/artifact/com.google.android.exoplayer/exoplayer-smoothstreaming?repo=jcenter
implementation 'com.google.android.exoplayer:exoplayer-ui:' + project.ext.exoPlayerVersion // (238 KB) https://mvnrepository.com/artifact/com.google.android.exoplayer/exoplayer-ui?repo=jcenter
implementation 'com.google.android.exoplayer:extension-cast:' + project.ext.exoPlayerVersion // ( 40 KB) https://mvnrepository.com/artifact/com.google.android.exoplayer/extension-cast?repo=jcenter

implementation 'com.google.code.gson:gson:' + '2.8.5' // https://mvnrepository.com/artifact/com.google.code.gson/gson
implementation 'com.google.code.gson:gson:' + '2.8.5' // (235 KB) https://mvnrepository.com/artifact/com.google.code.gson/gson
}

apply plugin: 'com.google.android.gms.strict-version-matcher-plugin'
6 changes: 6 additions & 0 deletions WebCast/proguard-rules.pro → WebCast/proguard-rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,9 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

-keep class com.github.warren_bank.webcast.** { *; }

-keep class com.google.android.exoplayer.** { *; }
-keep class com.google.android.gms.** { *; }
-keep class android.support.v7.app.MediaRouteActionProvider { *; }
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ public void onCreate(Bundle savedInstanceState) {
search.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String query) {
updateCurrentPage(query, true);
String url = query.contains(":") ? query : ("http://" + query);

updateCurrentPage(url, true);
return true;
}

Expand Down Expand Up @@ -622,7 +624,10 @@ public void onReceivedError(WebView view, WebResourceRequest request, WebResourc

WebSettings webSettings = webView.getSettings();
webSettings.setLoadWithOverviewMode(true);
webSettings.setUseWideViewPort(true);
webSettings.setSupportZoom(true);
webSettings.setBuiltInZoomControls(true);
webSettings.setDisplayZoomControls(true);
webSettings.setUseWideViewPort(false);
webSettings.setJavaScriptEnabled(true);
webSettings.setUserAgentString(
getResources().getString(R.string.user_agent)
Expand All @@ -634,7 +639,9 @@ public void onReceivedError(WebView view, WebResourceRequest request, WebResourc
webSettings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
}

webView.setHorizontalScrollBarEnabled(true);
webView.setInitialScale(0);
webView.setHorizontalScrollBarEnabled(false);
webView.setVerticalScrollBarEnabled(false);
webView.clearCache(true);
webView.clearHistory();
}
Expand Down
16 changes: 4 additions & 12 deletions WebCast/src/main/res/layouts/webview/layout/browser_content.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,11 @@
android:iconifiedByDefault="false"
android:inputType="textUri" />

<!-- WebView w/ scrollbars -->
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
<!-- WebView -->
<WebView
android:id="@+id/webView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fadeScrollbars="false"
android:scrollbarFadeDuration="0">

<WebView
android:id="@+id/webView"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</android.support.v4.widget.NestedScrollView>
android:layout_height="wrap_content" />

<!-- progress bar -->
<ProgressBar
Expand Down
18 changes: 2 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.google.android.gms:strict-version-matcher-plugin:1.0.3'
classpath 'com.android.tools.build:gradle:3.3.0' // https://mvnrepository.com/artifact/com.android.tools.build/gradle?repo=google
classpath 'com.google.android.gms:strict-version-matcher-plugin:1.1.0' // https://mvnrepository.com/artifact/com.google.android.gms/strict-version-matcher-plugin
}
}

Expand Down
20 changes: 4 additions & 16 deletions constants.gradle
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
// Copyright (C) 2017 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
project.ext {
releaseVersionCode = 1
releaseVersion = '01.00.00'
releaseVersionCode = 004020016
releaseVersion = '004.02.00-16API'
minSdkVersion = 16
targetSdkVersion = 28
compileSdkVersion = 28
buildToolsVersion = '28.0.2'
buildToolsVersion = '28.0.3'
supportLibraryVersion = '28.0.0'
javaVersion = JavaVersion.VERSION_1_8
exoPlayerVersion = '2.9.6'
}
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Sat Apr 14 08:02:51 BST 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.10.1-all.zip
14 changes: 0 additions & 14 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1 @@
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

include ':WebCast'

0 comments on commit d17ed90

Please sign in to comment.