mirror of
https://github.com/fankes/ProjectPromote.git
synced 2025-12-10 23:33:42 +08:00
chore: migrate to version catalog, Gropify
This commit is contained in:
@@ -1,5 +1,22 @@
|
|||||||
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
autowire(libs.plugins.android.application) apply false
|
alias(libs.plugins.android.application) apply false
|
||||||
autowire(libs.plugins.android.library) apply false
|
alias(libs.plugins.android.library) apply false
|
||||||
autowire(libs.plugins.kotlin.android) apply false
|
alias(libs.plugins.kotlin.android) apply false
|
||||||
|
}
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
tasks.withType<KotlinJvmCompile>().configureEach {
|
||||||
|
compilerOptions {
|
||||||
|
jvmTarget = JvmTarget.JVM_17
|
||||||
|
freeCompilerArgs.addAll(
|
||||||
|
"-opt-in=kotlin.ExperimentalStdlibApi",
|
||||||
|
"-Xno-param-assertions",
|
||||||
|
"-Xno-call-assertions",
|
||||||
|
"-Xno-receiver-assertions"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
plugins {
|
plugins {
|
||||||
autowire(libs.plugins.android.application)
|
alias(libs.plugins.android.application)
|
||||||
autowire(libs.plugins.kotlin.android)
|
alias(libs.plugins.kotlin.android)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = property.project.app.packageName
|
namespace = gropify.project.app.packageName
|
||||||
compileSdk = property.project.android.compileSdk
|
compileSdk = gropify.project.android.compileSdk
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = property.project.app.packageName
|
applicationId = gropify.project.app.packageName
|
||||||
minSdk = property.project.android.minSdk
|
minSdk = gropify.project.android.minSdk
|
||||||
targetSdk = property.project.android.targetSdk
|
targetSdk = gropify.project.android.targetSdk
|
||||||
versionName = property.project.app.versionName
|
versionName = gropify.project.app.versionName
|
||||||
versionCode = property.project.app.versionCode
|
versionCode = gropify.project.app.versionCode
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
@@ -25,25 +25,17 @@ android {
|
|||||||
sourceCompatibility = JavaVersion.VERSION_17
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
kotlinOptions {
|
|
||||||
jvmTarget = "17"
|
|
||||||
freeCompilerArgs = listOf(
|
|
||||||
"-Xno-param-assertions",
|
|
||||||
"-Xno-call-assertions",
|
|
||||||
"-Xno-receiver-assertions"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
buildFeatures { buildConfig = true }
|
buildFeatures { buildConfig = true }
|
||||||
lint { checkReleaseBuilds = false }
|
lint { checkReleaseBuilds = false }
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(project(":projectpromote"))
|
implementation(project(":projectpromote"))
|
||||||
implementation(androidx.core.core.ktx)
|
implementation(libs.core.ktx)
|
||||||
implementation(androidx.appcompat.appcompat)
|
implementation(libs.appcompat)
|
||||||
implementation(com.google.android.material.material)
|
implementation(libs.material)
|
||||||
implementation(androidx.constraintlayout.constraintlayout)
|
implementation(libs.constraintlayout)
|
||||||
testImplementation(junit.junit)
|
testImplementation(libs.junit)
|
||||||
androidTestImplementation(androidx.test.ext.junit)
|
androidTestImplementation(libs.junit.ext)
|
||||||
androidTestImplementation(androidx.test.espresso.espresso.core)
|
androidTestImplementation(libs.espresso.core)
|
||||||
}
|
}
|
||||||
@@ -3,7 +3,6 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
|||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.nonTransitiveRClass=true
|
android.nonTransitiveRClass=true
|
||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
kotlin.incremental.useClasspathSnapshot=true
|
|
||||||
# Project Configuration
|
# Project Configuration
|
||||||
project.name=ProjectPromote
|
project.name=ProjectPromote
|
||||||
project.description=An integrated dependency on my projects promotion for my own use.
|
project.description=An integrated dependency on my projects promotion for my own use.
|
||||||
|
|||||||
34
gradle/libs.versions.toml
Normal file
34
gradle/libs.versions.toml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
[versions]
|
||||||
|
agp = "8.13.1"
|
||||||
|
kotlin = "2.2.21"
|
||||||
|
maven-publish = "0.35.0"
|
||||||
|
markwon = "4.6.2"
|
||||||
|
okhttp = "5.3.0"
|
||||||
|
lifecycle = "2.9.4"
|
||||||
|
core-ktx = "1.17.0"
|
||||||
|
appcompat = "1.7.1"
|
||||||
|
material = "1.13.0"
|
||||||
|
constraintlayout = "2.2.1"
|
||||||
|
junit-ext = "1.3.0"
|
||||||
|
espresso = "3.7.0"
|
||||||
|
junit = "4.13.2"
|
||||||
|
|
||||||
|
[plugins]
|
||||||
|
android-application = { id = "com.android.application", version.ref = "agp" }
|
||||||
|
android-library = { id = "com.android.library", version.ref = "agp" }
|
||||||
|
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
||||||
|
maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "maven-publish" }
|
||||||
|
|
||||||
|
[libraries]
|
||||||
|
markwon-core = { group = "io.noties.markwon", name = "core", version.ref = "markwon" }
|
||||||
|
markwon-image = { group = "io.noties.markwon", name = "image", version.ref = "markwon" }
|
||||||
|
markwon-html = { group = "io.noties.markwon", name = "html", version.ref = "markwon" }
|
||||||
|
okhttp = { group = "com.squareup.okhttp3", name = "okhttp", version.ref = "okhttp" }
|
||||||
|
lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycle" }
|
||||||
|
core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "core-ktx" }
|
||||||
|
appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
|
||||||
|
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
|
||||||
|
constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
|
||||||
|
junit-ext = { group = "androidx.test.ext", name = "junit", version.ref = "junit-ext" }
|
||||||
|
espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espresso" }
|
||||||
|
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
preferences:
|
|
||||||
autowire-on-sync-mode: UPDATE_OPTIONAL_DEPENDENCIES
|
|
||||||
repositories-mode: FAIL_ON_PROJECT_REPOS
|
|
||||||
|
|
||||||
repositories:
|
|
||||||
gradle-plugin-portal:
|
|
||||||
scope: PLUGINS
|
|
||||||
google:
|
|
||||||
maven-central:
|
|
||||||
jit-pack:
|
|
||||||
|
|
||||||
plugins:
|
|
||||||
com.android.application:
|
|
||||||
alias: android-application
|
|
||||||
version: 8.13.0
|
|
||||||
com.android.library:
|
|
||||||
alias: android-library
|
|
||||||
version-ref: android-application
|
|
||||||
org.jetbrains.kotlin.android:
|
|
||||||
alias: kotlin-android
|
|
||||||
version: 2.2.10
|
|
||||||
com.vanniktech.maven.publish:
|
|
||||||
alias: maven-publish
|
|
||||||
version: 0.34.0
|
|
||||||
|
|
||||||
libraries:
|
|
||||||
io.noties.markwon:
|
|
||||||
core:
|
|
||||||
version: 4.6.2
|
|
||||||
image:
|
|
||||||
version-ref: <this>::core
|
|
||||||
html:
|
|
||||||
version-ref: <this>::core
|
|
||||||
com.squareup.okhttp3:
|
|
||||||
okhttp:
|
|
||||||
version: 5.1.0
|
|
||||||
androidx.lifecycle:
|
|
||||||
lifecycle-runtime-ktx:
|
|
||||||
version: 2.9.3
|
|
||||||
androidx.core:
|
|
||||||
core-ktx:
|
|
||||||
version: 1.17.0
|
|
||||||
androidx.appcompat:
|
|
||||||
appcompat:
|
|
||||||
version: 1.7.1
|
|
||||||
com.google.android.material:
|
|
||||||
material:
|
|
||||||
version: 1.13.0
|
|
||||||
androidx.constraintlayout:
|
|
||||||
constraintlayout:
|
|
||||||
version: 2.2.1
|
|
||||||
androidx.test.ext:
|
|
||||||
junit:
|
|
||||||
version: 1.3.0
|
|
||||||
androidx.test.espresso:
|
|
||||||
espresso-core:
|
|
||||||
version: 3.7.0
|
|
||||||
junit:
|
|
||||||
junit:
|
|
||||||
version: 4.13.2
|
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
plugins {
|
plugins {
|
||||||
autowire(libs.plugins.android.library)
|
alias(libs.plugins.android.library)
|
||||||
autowire(libs.plugins.kotlin.android)
|
alias(libs.plugins.kotlin.android)
|
||||||
autowire(libs.plugins.maven.publish)
|
alias(libs.plugins.maven.publish)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = property.project.projectpromote.groupName
|
namespace = gropify.project.projectpromote.groupName
|
||||||
compileSdk = property.project.android.compileSdk
|
compileSdk = gropify.project.android.compileSdk
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk = property.project.android.minSdk
|
minSdk = gropify.project.android.minSdk
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
consumerProguardFiles("consumer-rules.pro")
|
consumerProguardFiles("consumer-rules.pro")
|
||||||
}
|
}
|
||||||
@@ -23,28 +23,20 @@ android {
|
|||||||
sourceCompatibility = JavaVersion.VERSION_17
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
kotlinOptions {
|
|
||||||
jvmTarget = "17"
|
|
||||||
freeCompilerArgs = listOf(
|
|
||||||
"-Xno-param-assertions",
|
|
||||||
"-Xno-call-assertions",
|
|
||||||
"-Xno-receiver-assertions"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(io.noties.markwon.core)
|
implementation(libs.markwon.core)
|
||||||
implementation(io.noties.markwon.image)
|
implementation(libs.markwon.image)
|
||||||
implementation(io.noties.markwon.html)
|
implementation(libs.markwon.html)
|
||||||
implementation(com.squareup.okhttp3.okhttp)
|
implementation(libs.okhttp)
|
||||||
implementation(androidx.lifecycle.lifecycle.runtime.ktx)
|
implementation(libs.lifecycle.runtime.ktx)
|
||||||
implementation(androidx.core.core.ktx)
|
implementation(libs.core.ktx)
|
||||||
implementation(androidx.appcompat.appcompat)
|
implementation(libs.appcompat)
|
||||||
implementation(com.google.android.material.material)
|
implementation(libs.material)
|
||||||
testImplementation(junit.junit)
|
testImplementation(libs.junit)
|
||||||
androidTestImplementation(androidx.test.ext.junit)
|
androidTestImplementation(libs.junit.ext)
|
||||||
androidTestImplementation(androidx.test.espresso.espresso.core)
|
androidTestImplementation(libs.espresso.core)
|
||||||
}
|
}
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
@@ -64,23 +56,23 @@ publishing {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mavenPublishing {
|
mavenPublishing {
|
||||||
coordinates(property.project.projectpromote.groupName, property.project.projectpromote.moduleName, property.project.projectpromote.version)
|
coordinates(gropify.project.projectpromote.groupName, gropify.project.projectpromote.moduleName, gropify.project.projectpromote.version)
|
||||||
pom {
|
pom {
|
||||||
name = property.project.name
|
name = gropify.project.name
|
||||||
description = property.project.description
|
description = gropify.project.description
|
||||||
url = property.project.url
|
url = gropify.project.url
|
||||||
licenses {
|
licenses {
|
||||||
license {
|
license {
|
||||||
name = property.project.licence.name
|
name = gropify.project.licence.name
|
||||||
url = property.project.licence.url
|
url = gropify.project.licence.url
|
||||||
distribution = property.project.licence.url
|
distribution = gropify.project.licence.url
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
developers {
|
developers {
|
||||||
developer {
|
developer {
|
||||||
id = property.project.developer.id
|
id = gropify.project.developer.id
|
||||||
name = property.project.developer.name
|
name = gropify.project.developer.name
|
||||||
email = property.project.developer.email
|
email = gropify.project.developer.email
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,15 +5,22 @@ pluginManagement {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
plugins {
|
dependencyResolutionManagement {
|
||||||
id("com.highcapable.sweetdependency") version "1.0.4"
|
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||||
id("com.highcapable.sweetproperty") version "1.0.8"
|
repositories {
|
||||||
}
|
google()
|
||||||
sweetProperty {
|
mavenCentral()
|
||||||
global {
|
maven("https://jitpack.io")
|
||||||
sourcesCode { isEnable = false }
|
|
||||||
}
|
}
|
||||||
rootProject { all { isEnable = false } }
|
}
|
||||||
|
plugins {
|
||||||
|
id("com.highcapable.gropify") version "1.0.0"
|
||||||
|
}
|
||||||
|
gropify {
|
||||||
|
global {
|
||||||
|
android { isEnabled = false }
|
||||||
|
}
|
||||||
|
rootProject { common { isEnabled = false } }
|
||||||
}
|
}
|
||||||
rootProject.name = "ProjectPromote"
|
rootProject.name = "ProjectPromote"
|
||||||
include(":demo-app")
|
include(":demo-app")
|
||||||
|
|||||||
Reference in New Issue
Block a user