Commit 985a15df by 刘鹏

feat: 拆分confide,新增api模块,改变confide发布方式

parent 80e3afd0
/build
\ No newline at end of file
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply from: "../../maven_push_api.gradle"
version = '1.0.0'
android {
compileSdkVersion rootProject.ext.android["compileSdkVersion"]
buildToolsVersion rootProject.ext.android["buildToolsVersion"]
defaultConfig {
minSdkVersion rootProject.ext.android["minSdkVersion"]
targetSdkVersion rootProject.ext.android["targetSdkVersion"]
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
implementation "com.alibaba:arouter-api:$arouter_api"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
\ No newline at end of file
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.ydl.confide.api">
</manifest>
\ No newline at end of file
...@@ -41,7 +41,6 @@ ext { ...@@ -41,7 +41,6 @@ ext {
//-------------- 业务模块 API 层 -------------- //-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.6", "m-audioim-api" : "0.0.6",
"m-confide-api" : "0.0.2.16",
"m-consultant-api": "0.0.5.63", "m-consultant-api": "0.0.5.63",
"m-course-api" : "0.0.3.6", "m-course-api" : "0.0.3.6",
"m-fm-api" : "0.0.3", "m-fm-api" : "0.0.3",
...@@ -127,7 +126,7 @@ ext { ...@@ -127,7 +126,7 @@ ext {
//-------------- 业务模块 API 层 -------------- //-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.6", "m-audioim-api" : "0.0.6",
"m-confide-api" : "0.0.2.16", "m-confide-api" : "1.0.0",
"m-consultant-api": "0.0.5.63", "m-consultant-api": "0.0.5.63",
"m-course-api" : "0.0.3.6", "m-course-api" : "0.0.3.6",
"m-fm-api" : "0.0.3", "m-fm-api" : "0.0.3",
......
...@@ -2,13 +2,7 @@ apply plugin: 'com.android.library' ...@@ -2,13 +2,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-kapt'
apply plugin: 'resTools' // 资源重命名插件 apply from : '../maven_push.gradle'
// 配置资源重命名插件
resConfig {
new_prefix = 'confide_' // 资源前缀
old_prefix = '' // 老前缀,可为''空字符串
}
kapt { kapt {
arguments { arguments {
...@@ -17,16 +11,11 @@ kapt { ...@@ -17,16 +11,11 @@ kapt {
} }
android { android {
// compileSdkVersion rootProject.ext.android["compileSdkVersion"]
// buildToolsVersion rootProject.ext.android["buildToolsVersion"]
compileSdkVersion rootProject.ext.compileSdkVersion compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig { defaultConfig {
// minSdkVersion rootProject.ext.android["minSdkVersion"]
// targetSdkVersion rootProject.ext.android["targetSdkVersion"]
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion
...@@ -54,12 +43,6 @@ android { ...@@ -54,12 +43,6 @@ android {
enabled true enabled true
} }
publishNonDefault true
productFlavors {
ydl {}
xlzx {}
}
//设置JDK1.8 //设置JDK1.8
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_1_8
...@@ -96,7 +79,7 @@ dependencies { ...@@ -96,7 +79,7 @@ dependencies {
api project(':ydl-utils') api project(':ydl-utils')
implementation modularPublication('com.ydl:m-im-api') implementation modularPublication('com.ydl:m-im-api')
implementation modularPublication('com.ydl:m-user-api') implementation modularPublication('com.ydl:m-user-api')
implementation modularPublication('com.ydl:m-confide-api') implementation project(':api:confide')
}else { }else {
//发布时使用 //发布时使用
api rootProject.ext.dependencies["ydl-media"] api rootProject.ext.dependencies["ydl-media"]
......
modular {
packageName "com.ydl.confide"
// 模块发布需要的参数
publish {
modules {
xlzx {
//发布信息 module/api 通用
groupId = "com.ydl"
artifactId = "m-confide-module-xlzx"
// 上报的业务模块 aar 包的版本号
version = rootProject.ext.ydlPublishVersion[childProject.getName()]
}
ydl{
//发布信息 module/api 通用
groupId = "com.ydl"
artifactId = "m-confide-module-ydl"
// 上报的业务模块 aar 包的版本号
version = rootProject.ext.ydlPublishVersion[childProject.getName()]
}
}
api {
//发布信息 module/api 通用
groupId = "com.ydl"
artifactId = "m-confide-api"
version = rootProject.ext.ydlPublishVersion["${childProject.getName()}-api"]
// API 层打包时需要引入的依赖
apiDependencies {
implementation 'androidx.fragment:fragment-ktx:1.2.4'
implementation "com.google.code.gson:gson:2.8.2"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.alibaba:arouter-api:1.4.1'
}
}
}
}
\ No newline at end of file
...@@ -281,15 +281,16 @@ ...@@ -281,15 +281,16 @@
<!--用户评论banner--> <!--用户评论banner-->
<LinearLayout <LinearLayout
android:id="@+id/comment_banner_view_ll" android:id="@+id/comment_banner_view_ll"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="37dp" android:layout_height="37dp"
android:background="#ffffff" android:background="#ffffff"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingLeft="5dp" android:paddingLeft="5dp"
android:paddingRight="10dp" android:paddingRight="10dp"
android:visibility="gone"> android:visibility="gone"
tools:visibility="visible">
<TextView <TextView
android:id="@+id/im_focus_btn" android:id="@+id/im_focus_btn"
...@@ -302,16 +303,16 @@ ...@@ -302,16 +303,16 @@
tools:text="关注" /> tools:text="关注" />
<View <View
android:layout_width="0.5dp" android:layout_width="0.5dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="5dp" android:layout_marginLeft="5dp"
android:background="#F0F0F0" /> android:background="#F0F0F0" />
<com.yidianling.uikit.business.session.view.ImCommentBannerView <com.yidianling.uikit.business.session.view.ImCommentBannerView
android:id="@+id/comment_banner_view" android:id="@+id/comment_banner_view"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"></com.yidianling.uikit.business.session.view.ImCommentBannerView> android:layout_weight="1"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
apply plugin: 'maven'
def mavenRepositoryUrl = "http://nexus.yidianling.com/repository/AndroidReleases/"
def getVersionName() {
return hasProperty('VERSION_NAME') ? VERSION_NAME : rootProject.ext.ydlPublishVersion[project.getName()]
}
task sourceJar(type:Jar){
classifier = 'source'
from android.sourceSets.main.java.srcDirs
}
artifacts {
archives sourceJar
}
afterEvaluate { project ->
uploadArchives {
repositories {
mavenDeployer {
pom.artifactId = "m-" + project.name + "-api"
pom.groupId = "com.ydl"
pom.version = project.version
repository(url: mavenRepositoryUrl) {
authentication(userName: "admin", password: "fjoi#1+#@")
}
// repository(url:mavenLocal().url)
}
}
}
uploadArchives.doFirst {
// log
println String.format(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n>>>>> [%s] 正在将[%s]版本的[%s]包上传到Maven的[%s]仓库 >>>>>\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
, project.getName()
, getVersionName()
, "aar"
, "release"
)
}
}
\ No newline at end of file
...@@ -4,4 +4,4 @@ include ':app', ...@@ -4,4 +4,4 @@ include ':app',
':m-home', ':m-home',
':m-consultant', ':m-muse', ':m-fm', ':m-tests', ":m-course", ':m-consultant', ':m-muse', ':m-fm', ':m-tests', ":m-course",
":m-im",":m-dynamic","m-article","m-audioim","m-user","m-confide" ":m-im",":m-dynamic","m-article","m-audioim","m-user","m-confide"
include ':ydl-tuicore' include ':ydl-tuicore',':api:confide'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment