mirror of
https://github.com/Tencent/QMUI_Android.git
synced 2026-10-17 04:31:16 +08:00
release qmui, arch to 2.1.0 and update publication bash.
This commit is contained in:
@@ -13,8 +13,8 @@ object Dep {
|
||||
|
||||
object QMUI {
|
||||
const val group = "com.qmuiteam"
|
||||
const val qmuiVer = "2.0.1"
|
||||
const val archVer = "2.0.1_f_16"
|
||||
const val qmuiVer = "2.1.0"
|
||||
const val archVer = "2.1.0"
|
||||
const val typeVer = "0.1.0"
|
||||
const val composeCoreVer = "0.0.1"
|
||||
const val composeVer = "0.0.1"
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
package com.qmuiteam.plugin
|
||||
|
||||
import com.android.build.gradle.LibraryExtension
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import java.io.File
|
||||
import java.util.*
|
||||
import kotlin.io.*
|
||||
import com.android.build.gradle.BaseExtension
|
||||
import com.android.build.gradle.LibraryExtension
|
||||
import org.gradle.api.plugins.JavaPluginExtension
|
||||
import org.gradle.api.publish.PublishingExtension
|
||||
import org.gradle.api.publish.maven.MavenPublication
|
||||
import org.gradle.api.tasks.bundling.Jar
|
||||
import org.gradle.api.tasks.javadoc.Javadoc
|
||||
import org.gradle.kotlin.dsl.configure
|
||||
import org.gradle.kotlin.dsl.create
|
||||
import org.gradle.plugins.signing.SigningExtension
|
||||
import java.util.*
|
||||
import kotlin.io.*
|
||||
|
||||
class QMUIPublish: Plugin<Project> {
|
||||
class QMUIPublish : Plugin<Project> {
|
||||
override fun apply(project: Project) {
|
||||
val isAndroid = project.hasProperty("android")
|
||||
|
||||
@@ -23,12 +20,13 @@ class QMUIPublish: Plugin<Project> {
|
||||
println("android")
|
||||
val android = project.extensions.getByName("android") as LibraryExtension
|
||||
android.publishing {
|
||||
singleVariant("release"){
|
||||
singleVariant("release") {
|
||||
withJavadocJar()
|
||||
withSourcesJar()
|
||||
}
|
||||
}
|
||||
}else{
|
||||
|
||||
} else {
|
||||
println("java/kotlin")
|
||||
project.configure<JavaPluginExtension> {
|
||||
withSourcesJar()
|
||||
@@ -59,9 +57,14 @@ class QMUIPublish: Plugin<Project> {
|
||||
}
|
||||
publications {
|
||||
create<MavenPublication>("release") {
|
||||
if(isAndroid){
|
||||
|
||||
project.configure<SigningExtension> {
|
||||
sign(this@create)
|
||||
}
|
||||
|
||||
if (isAndroid) {
|
||||
from(components.getByName("release"))
|
||||
}else{
|
||||
} else {
|
||||
from(components.getByName("java"))
|
||||
}
|
||||
|
||||
@@ -72,6 +75,7 @@ class QMUIPublish: Plugin<Project> {
|
||||
pom {
|
||||
name.set("${project.group}:${project.name}")
|
||||
url.set("https://github.com/Tencent/QMUI_Android")
|
||||
description.set("qmui android library.")
|
||||
licenses {
|
||||
license {
|
||||
name.set(properties.getProperty("license.name"))
|
||||
|
||||
Reference in New Issue
Block a user