使用catalog版本依赖

v4
laoyuyu 2 years ago
parent 6aa63ff699
commit 13fd3e22b6
  1. 8
      AppFrame/build.gradle
  2. 17
      Aria/build.gradle
  3. 2
      AriaAnnotations/build.gradle
  4. 13
      FtpComponent/build.gradle
  5. 13
      HttpComponent/build.gradle
  6. 13
      M3U8Component/build.gradle
  7. 14
      PublicComponent/build.gradle
  8. 13
      SFtpComponent/build.gradle
  9. 8
      app/build.gradle
  10. 40
      build.gradle
  11. 2
      gradle/wrapper/gradle-wrapper.properties
  12. 31
      libs.versions.toml
  13. 24
      settings.gradle

@ -3,12 +3,12 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-kapt'
android { android {
compileSdkVersion rootProject.ext.compileSdkVersion compileSdkVersion libs.versions.compilesdk.get().toInteger()
buildToolsVersion rootProject.ext.buildToolsVersion buildToolsVersion libs.versions.buildToolsVersion.get()
defaultConfig { defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion libs.versions.minSdk.get().toInteger()
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion libs.versions.targetsdk.get().toInteger()
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"

@ -1,12 +1,15 @@
apply plugin: 'com.android.library' plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
}
android { android {
compileSdkVersion rootProject.ext.compileSdkVersion compileSdkVersion libs.versions.compilesdk.get().toInteger()
buildToolsVersion rootProject.ext.buildToolsVersion buildToolsVersion libs.versions.buildToolsVersion.get()
defaultConfig { defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion libs.versions.minSdk.get().toInteger()
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion libs.versions.targetsdk.get().toInteger()
versionCode rootProject.ext.versionCode versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName versionName rootProject.ext.versionName
} }
@ -25,8 +28,8 @@ android {
} }
dependencies { dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12' testImplementation(libs.bundles.android.test)
// implementation "androidx.appcompat:appcompat:${rootProject.ext.XAppcompatVersion}" implementation(libs.appcompat)
api project(path: ':AriaAnnotations') api project(path: ':AriaAnnotations')
api project(path: ':PublicComponent') api project(path: ':PublicComponent')
api project(path: ':HttpComponent') api project(path: ':HttpComponent')

@ -8,7 +8,7 @@ sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7 targetCompatibility = JavaVersion.VERSION_1_7
dependencies { dependencies {
compile fileTree(dir: 'libs', include: ['*.jar']) // compile fileTree(dir: 'libs', include: ['*.jar'])
} }
//apply from: 'bintray-release.gradle' //apply from: 'bintray-release.gradle'

@ -1,12 +1,15 @@
apply plugin: 'com.android.library' plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
}
android { android {
compileSdkVersion rootProject.ext.compileSdkVersion compileSdkVersion libs.versions.compilesdk.get().toInteger()
buildToolsVersion rootProject.ext.buildToolsVersion buildToolsVersion libs.versions.buildToolsVersion.get()
defaultConfig { defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion libs.versions.minSdk.get().toInteger()
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion libs.versions.targetsdk.get().toInteger()
versionCode rootProject.ext.versionCode versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName versionName rootProject.ext.versionName

@ -1,12 +1,15 @@
apply plugin: 'com.android.library' plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
}
android { android {
compileSdkVersion rootProject.ext.compileSdkVersion compileSdkVersion libs.versions.compilesdk.get().toInteger()
buildToolsVersion rootProject.ext.buildToolsVersion buildToolsVersion libs.versions.buildToolsVersion.get()
defaultConfig { defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion libs.versions.minSdk.get().toInteger()
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion libs.versions.targetsdk.get().toInteger()
versionCode rootProject.ext.versionCode versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName versionName rootProject.ext.versionName

@ -1,12 +1,15 @@
apply plugin: 'com.android.library' plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
}
android { android {
compileSdkVersion rootProject.ext.compileSdkVersion compileSdkVersion libs.versions.compilesdk.get().toInteger()
buildToolsVersion rootProject.ext.buildToolsVersion buildToolsVersion libs.versions.buildToolsVersion.get()
defaultConfig { defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion libs.versions.minSdk.get().toInteger()
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion libs.versions.targetsdk.get().toInteger()
versionCode rootProject.ext.versionCode versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName versionName rootProject.ext.versionName

@ -1,13 +1,15 @@
apply plugin: 'com.android.library' plugins {
apply plugin: 'kotlin-android' id 'com.android.library'
id 'org.jetbrains.kotlin.android'
}
android { android {
compileSdkVersion rootProject.ext.compileSdkVersion compileSdkVersion libs.versions.compilesdk.get().toInteger()
buildToolsVersion rootProject.ext.buildToolsVersion buildToolsVersion libs.versions.buildToolsVersion.get()
defaultConfig { defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion libs.versions.minSdk.get().toInteger()
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion libs.versions.targetsdk.get().toInteger()
versionCode rootProject.ext.versionCode versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName versionName rootProject.ext.versionName

@ -1,12 +1,15 @@
apply plugin: 'com.android.library' plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
}
android { android {
compileSdkVersion rootProject.ext.compileSdkVersion compileSdkVersion libs.versions.compilesdk.get().toInteger()
buildToolsVersion rootProject.ext.buildToolsVersion buildToolsVersion libs.versions.buildToolsVersion.get()
defaultConfig { defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion libs.versions.minSdk.get().toInteger()
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion libs.versions.targetsdk.get().toInteger()
versionCode rootProject.ext.versionCode versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName versionName rootProject.ext.versionName

@ -4,13 +4,13 @@ apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-kapt'
android { android {
compileSdkVersion rootProject.ext.compileSdkVersion compileSdkVersion libs.versions.compilesdk.get().toInteger()
buildToolsVersion rootProject.ext.buildToolsVersion buildToolsVersion libs.versions.buildToolsVersion.get()
defaultConfig { defaultConfig {
applicationId "com.arialyy.simple" applicationId "com.arialyy.simple"
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion libs.versions.minSdk.get().toInteger()
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion libs.versions.targetsdk.get().toInteger()
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
multiDexEnabled true multiDexEnabled true

@ -1,45 +1,17 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { buildscript {
ext.kotlin_version = '1.5.20' ext.kotlin_version = '1.7.20'
// ext.kotlin_version = '1.3.20'
repositories {
jcenter()
mavenCentral()
google()
maven { url 'https://jitpack.io' }
}
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:4.1.3' classpath files(libs.class.superclass.protectionDomain.codeSource.location)
// classpath 'com.novoda:bintray-release:0.9.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.4.30" classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.4.30"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // kotlin classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // kotlin
// classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
// classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
google()
maven { url 'https://jitpack.io' }
}
tasks.withType(Javadoc) {
options {
encoding "UTF-8"
charSet 'UTF-8'
links "http://docs.oracle.com/javase/7/docs/api"
}
} }
} }
task clean(type: Delete) { plugins {
delete rootProject.buildDir id 'com.android.application' version '7.3.1' apply false
id 'com.android.library' version '7.3.1' apply false
id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
} }
ext { ext {

@ -5,4 +5,4 @@ zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
#distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip #distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
#distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip #distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip

@ -0,0 +1,31 @@
[versions]
minSdk = "21"
compilesdk = "33"
targetsdk = "33"
appcompat = "1.5.1"
recyclerview = "1.2.1"
buildToolsVersion="33.0.1"
room = "2.4.3"
test-junit = "4.13.2"
android-junit = "1.1.4"
android-espresso = "3.5.0"
android-ktx = "1.7.0"
lifecycle = "2.5.1"
[libraries]
recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "recyclerview" }
room-runtime = { module = "androidx.room:room-runtime", version.ref = "room" }
room-compiler = { module = "androidx.room:room-compiler", version.ref = "room" }
junit = { module = "junit:junit", version.ref = "test-junit" }
android-junit = { module = "androidx.test.ext:junit", version.ref = "android-junit" }
android-espresso = { module = "androidx.test.espresso:espresso-core", version.ref = "android-espresso" }
android-ktx = { module = "androidx.core:core-ktx", version.ref = "android-ktx" }
appcompat = {module = "androidx.appcompat:appcompat", version.ref = "appcompat"}
lifecycle-viewmodel-ktx = {module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycle"}
lifecycle-viewmodel-compose = {module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "lifecycle"}
lifecycle-runtime-ktx = {module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycle"}
[bundles]
android-test = ["android-junit", "android-espresso"]
lifecycle = ["lifecycle-viewmodel-ktx", "lifecycle-viewmodel-compose", "lifecycle-runtime-ktx"]

@ -1,2 +1,26 @@
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
mavenLocal()
}
}
enableFeaturePreview('VERSION_CATALOGS')
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
mavenLocal()
}
versionCatalogs {
libs {
from(files("libs.versions.toml"))
}
}
}
include ':app', ':Aria', ':AriaAnnotations', ':AriaCompiler', ':AppFrame', ':HttpComponent', ':M3U8Component', ':SFtpComponent', include ':app', ':Aria', ':AriaAnnotations', ':AriaCompiler', ':AppFrame', ':HttpComponent', ':M3U8Component', ':SFtpComponent',
':FtpComponent', ':PublicComponent' ':FtpComponent', ':PublicComponent'

Loading…
Cancel
Save