Update gradle

release
FongMi 7 days ago
parent 110be2084b
commit 0fad33dfcf
  1. 36
      app/build.gradle
  2. 29
      app/src/leanback/java/com/fongmi/android/tv/bean/Func.java
  3. 26
      app/src/leanback/java/com/fongmi/android/tv/ui/activity/HomeActivity.java
  4. 51
      app/src/leanback/java/com/fongmi/android/tv/ui/custom/CustomKeyboard.java
  5. 2
      build.gradle
  6. 10
      catvod/build.gradle
  7. 10
      chaquo/build.gradle
  8. 8
      forcetech/build.gradle
  9. 2
      gradle.properties
  10. 10
      hook/build.gradle
  11. 8
      jianpian/build.gradle
  12. 10
      quickjs/build.gradle
  13. 13
      settings.gradle
  14. 10
      thunder/build.gradle
  15. 8
      tvbus/build.gradle
  16. 8
      zlive/build.gradle

@ -8,12 +8,10 @@ rootProject.file('local.properties').withInputStream {
}
android {
namespace 'com.fongmi.android.tv'
namespace = 'com.fongmi.android.tv'
compileSdk {
version = release(37) {
it.minorApiLevel = 1
}
version = release(37)
}
defaultConfig {
@ -50,8 +48,8 @@ android {
}
buildFeatures {
buildConfig true
viewBinding true
buildConfig = true
viewBinding = true
}
signingConfigs {
@ -65,9 +63,9 @@ android {
buildTypes {
release {
minifyEnabled true
shrinkResources true
signingConfig signingConfigs.release
minifyEnabled = true
shrinkResources = true
signingConfig = signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro', 'proguard-rules-media.pro'
}
}
@ -79,13 +77,8 @@ android {
}
}
android.applicationVariants.configureEach { variant ->
variant.outputs.configureEach { output ->
outputFileName = "${variant.productFlavors[0].name}-${variant.productFlavors[1].name}.apk"
}
}
configurations.configureEach {
exclude group: 'com.android.support'
resolutionStrategy {
force 'com.squareup.okhttp3:okhttp:' + okhttpVersion
}
@ -96,12 +89,23 @@ android {
}
compileOptions {
coreLibraryDesugaringEnabled true
coreLibraryDesugaringEnabled = true
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}
androidComponents {
onVariants(selector().withBuildType('release')) { variant ->
def flavors = variant.productFlavors.collectEntries { [(it.first): it.second] }
def mode = flavors['mode'] ?: 'mode'
def abi = flavors['abi'] ?: 'abi'
variant.outputs.each { output ->
output.outputFileName.set("${mode}-${abi}.apk")
}
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.aar"])
implementation project(':catvod')

@ -1,7 +1,5 @@
package com.fongmi.android.tv.bean;
import android.annotation.SuppressLint;
import androidx.annotation.Nullable;
import com.fongmi.android.tv.R;
@ -34,28 +32,13 @@ public class Func implements Diffable<Func> {
return ResUtil.getString(resId);
}
@SuppressLint("NonConstantResourceId")
public void setDrawable() {
switch (resId) {
case R.string.home_vod:
this.drawable = R.drawable.ic_home_vod;
break;
case R.string.home_live:
this.drawable = R.drawable.ic_home_live;
break;
case R.string.home_keep:
this.drawable = R.drawable.ic_home_keep;
break;
case R.string.home_push:
this.drawable = R.drawable.ic_home_push;
break;
case R.string.home_search:
this.drawable = R.drawable.ic_home_search;
break;
case R.string.home_setting:
this.drawable = R.drawable.ic_home_setting;
break;
}
if (resId == R.string.home_vod) this.drawable = R.drawable.ic_home_vod;
else if (resId == R.string.home_live) this.drawable = R.drawable.ic_home_live;
else if (resId == R.string.home_keep) this.drawable = R.drawable.ic_home_keep;
else if (resId == R.string.home_push) this.drawable = R.drawable.ic_home_push;
else if (resId == R.string.home_search) this.drawable = R.drawable.ic_home_search;
else if (resId == R.string.home_setting) this.drawable = R.drawable.ic_home_setting;
}
@Override

@ -385,26 +385,12 @@ public class HomeActivity extends BaseActivity implements CustomTitleView.Listen
@Override
public void onItemClick(Func item) {
switch (item.getResId()) {
case R.string.home_vod:
VodActivity.start(this, mResult);
break;
case R.string.home_live:
LiveActivity.start(this);
break;
case R.string.home_search:
SearchActivity.start(this);
break;
case R.string.home_keep:
KeepActivity.start(this);
break;
case R.string.home_push:
PushActivity.start(this);
break;
case R.string.home_setting:
SettingActivity.start(this);
break;
}
if (item.getResId() == R.string.home_vod) VodActivity.start(this, mResult);
else if (item.getResId() == R.string.home_live) LiveActivity.start(this);
else if (item.getResId() == R.string.home_keep) KeepActivity.start(this);
else if (item.getResId() == R.string.home_push) PushActivity.start(this);
else if (item.getResId() == R.string.home_search) SearchActivity.start(this);
else if (item.getResId() == R.string.home_setting) SettingActivity.start(this);
}
@Override

@ -1,7 +1,5 @@
package com.fongmi.android.tv.ui.custom;
import android.annotation.SuppressLint;
import com.fongmi.android.tv.R;
import com.fongmi.android.tv.databinding.ActivitySearchBinding;
import com.fongmi.android.tv.ui.adapter.KeyboardAdapter;
@ -39,36 +37,31 @@ public class CustomKeyboard implements KeyboardAdapter.OnClickListener {
}
@Override
@SuppressLint("NonConstantResourceId")
public void onIconClick(int resId) {
StringBuilder sb = new StringBuilder(binding.keyword.getText().toString());
int cursor = binding.keyword.getSelectionStart();
switch (resId) {
case R.drawable.ic_setting_home:
callback.showDialog();
break;
case R.drawable.ic_keyboard_remote:
callback.onRemote();
break;
case R.drawable.ic_keyboard_search:
callback.onSearch();
break;
case R.drawable.ic_keyboard_left:
binding.keyword.setSelection(--cursor < 0 ? 0 : cursor);
break;
case R.drawable.ic_keyboard_right:
binding.keyword.setSelection(++cursor > binding.keyword.length() ? binding.keyword.length() : cursor);
break;
case R.drawable.ic_keyboard_back:
if (cursor == 0) return;
sb.deleteCharAt(cursor - 1);
binding.keyword.setText(sb.toString());
binding.keyword.setSelection(cursor - 1);
break;
case R.drawable.ic_keyboard:
adapter.toggle();
break;
}
if (resId == R.drawable.ic_setting_home) callback.showDialog();
else if (resId == R.drawable.ic_keyboard_remote) callback.onRemote();
else if (resId == R.drawable.ic_keyboard_search) callback.onSearch();
else if (resId == R.drawable.ic_keyboard_left) onMoveLeft(cursor);
else if (resId == R.drawable.ic_keyboard_right) onMoveRight(cursor);
else if (resId == R.drawable.ic_keyboard_back) onBackspace(sb, cursor);
else if (resId == R.drawable.ic_keyboard) adapter.toggle();
}
private void onMoveLeft(int cursor) {
binding.keyword.setSelection(--cursor < 0 ? 0 : cursor);
}
private void onMoveRight(int cursor) {
binding.keyword.setSelection(++cursor > binding.keyword.length() ? binding.keyword.length() : cursor);
}
private void onBackspace(StringBuilder sb, int cursor) {
if (cursor <= 0) return;
sb.deleteCharAt(cursor - 1);
binding.keyword.setText(sb.toString());
binding.keyword.setSelection(cursor - 1);
}
@Override

@ -16,7 +16,7 @@ tasks.register('buildAllRelease') {
from fileTree("$rootDir/app/build/outputs/apk") { include '**/release/*.apk' }
into "$rootDir/Release/apk"
eachFile { it.path = it.name }
includeEmptyDirs false
includeEmptyDirs = false
}
}
}

@ -3,21 +3,19 @@ plugins {
}
android {
namespace 'com.github.catvod.crawler'
namespace = 'com.github.catvod.crawler'
compileSdk {
version = release(37) {
it.minorApiLevel = 1
}
version = release(37)
}
defaultConfig {
minSdk 24
targetSdk 36
targetSdk 37
}
compileOptions {
coreLibraryDesugaringEnabled true
coreLibraryDesugaringEnabled = true
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

@ -4,19 +4,17 @@ plugins {
}
android {
namespace 'com.fongmi.chaquo'
namespace = 'com.fongmi.chaquo'
compileSdk {
version = release(37) {
it.minorApiLevel = 1
}
version = release(37)
}
defaultConfig {
minSdk 24
targetSdk 36
targetSdk 37
python {
version "3.10"
version = "3.10"
pip {
install("-r", "requirements.txt")
}

@ -3,17 +3,15 @@ plugins {
}
android {
namespace 'com.forcetech'
namespace = 'com.forcetech'
compileSdk {
version = release(37) {
it.minorApiLevel = 1
}
version = release(37)
}
defaultConfig {
minSdk 24
targetSdk 36
targetSdk 37
ndk { abiFilters "armeabi-v7a" }
}
}

@ -2,7 +2,5 @@ org.gradle.jvmargs=-Xmx4g -Dfile.encoding=UTF-8 --add-exports jdk.compiler/com.s
org.gradle.caching=true
org.gradle.parallel=true
android.useAndroidX=true
android.enableJetifier=true
android.nonFinalResIds=false
android.nonTransitiveRClass=false
android.useFullClasspathForDexingTransform=true

@ -3,21 +3,19 @@ plugins {
}
android {
namespace 'com.fongmi.hook'
namespace = 'com.fongmi.hook'
compileSdk {
version = release(37) {
it.minorApiLevel = 1
}
version = release(37)
}
defaultConfig {
minSdk 24
targetSdk 36
targetSdk 37
}
compileOptions {
coreLibraryDesugaringEnabled true
coreLibraryDesugaringEnabled = true
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

@ -3,17 +3,15 @@ plugins {
}
android {
namespace 'com.p2p'
namespace = 'com.p2p'
compileSdk {
version = release(37) {
it.minorApiLevel = 1
}
version = release(37)
}
defaultConfig {
minSdk 24
targetSdk 36
targetSdk 37
}
}

@ -3,21 +3,19 @@ plugins {
}
android {
namespace 'com.fongmi.android.tv.quickjs'
namespace = 'com.fongmi.android.tv.quickjs'
compileSdk {
version = release(37) {
it.minorApiLevel = 1
}
version = release(37)
}
defaultConfig {
minSdk 24
targetSdk 36
targetSdk 37
}
compileOptions {
coreLibraryDesugaringEnabled true
coreLibraryDesugaringEnabled = true
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

@ -1,6 +1,3 @@
plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '1.0.0'
}
pluginManagement {
repositories {
gradlePluginPortal()
@ -8,19 +5,25 @@ pluginManagement {
google()
}
}
plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '1.0.0'
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
google()
flatDir { dirs "$rootDir/app/libs" }
maven { url "https://jitpack.io" }
maven { url = "https://jitpack.io" }
maven {
url "http://4thline.org/m2"
url = "http://4thline.org/m2"
allowInsecureProtocol = true
}
}
}
include ':app'
include ':catvod'
include ':chaquo'

@ -3,21 +3,19 @@ plugins {
}
android {
namespace 'com.ghost.thunder'
namespace = 'com.ghost.thunder'
compileSdk {
version = release(37) {
it.minorApiLevel = 1
}
version = release(37)
}
defaultConfig {
minSdk 24
targetSdk 36
targetSdk 37
}
compileOptions {
coreLibraryDesugaringEnabled true
coreLibraryDesugaringEnabled = true
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

@ -3,17 +3,15 @@ plugins {
}
android {
namespace 'com.tvbus.engine'
namespace = 'com.tvbus.engine'
compileSdk {
version = release(37) {
it.minorApiLevel = 1
}
version = release(37)
}
defaultConfig {
minSdk 24
targetSdk 36
targetSdk 37
ndk { abiFilters "armeabi-v7a" }
}
}

@ -3,17 +3,15 @@ plugins {
}
android {
namespace 'com.east.android.zlive'
namespace = 'com.east.android.zlive'
compileSdk {
version = release(37) {
it.minorApiLevel = 1
}
version = release(37)
}
defaultConfig {
minSdk 24
targetSdk 36
targetSdk 37
ndk { abiFilters "armeabi-v7a" }
}
}

Loading…
Cancel
Save