Commit e30a80a7 by 万齐军

feat: course改造

parent 610d4cb0
/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.course.api">
</manifest>
\ No newline at end of file
...@@ -242,7 +242,7 @@ ext { ...@@ -242,7 +242,7 @@ ext {
"ydl-m-consultant-api" : "com.ydl:m-consultant-api:1.0.0", "ydl-m-consultant-api" : "com.ydl:m-consultant-api:1.0.0",
"ydl-m-dynamic-api" : "com.ydl:m-dynamic-api:1.0.0", "ydl-m-dynamic-api" : "com.ydl:m-dynamic-api:1.0.0",
"ydl-m-confide-api" : "com.ydl:m-confide-api:1.0.0", "ydl-m-confide-api" : "com.ydl:m-confide-api:1.0.0",
"ydl-m-course-api" : "com.ydl:m-course-api:${ydlPublishVersion["m-course-api"]}", "ydl-m-course-api" : "com.ydl:m-course-api:1.0.0",
] ]
} }
...@@ -27,7 +27,6 @@ android { ...@@ -27,7 +27,6 @@ android {
} }
} }
flavorDimensions "versionCode"
} }
buildTypes { buildTypes {
......
...@@ -2,6 +2,7 @@ apply plugin: 'com.android.library' ...@@ -2,6 +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 from: "../maven_push.gradle"
android { android {
compileSdkVersion rootProject.ext.android["compileSdkVersion"] compileSdkVersion rootProject.ext.android["compileSdkVersion"]
...@@ -23,7 +24,6 @@ android { ...@@ -23,7 +24,6 @@ android {
} }
} }
flavorDimensions "versionCode"
} }
buildTypes { buildTypes {
...@@ -32,26 +32,10 @@ android { ...@@ -32,26 +32,10 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
} }
} }
publishNonDefault true
productFlavors {
ydl {}
xlzx {}
}
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8
} }
sourceSets {
main {
manifest.srcFile 'src/main/AndroidManifest.xml'
res.srcDirs = [
'src/main/res'
]
}
}
} }
dependencies { dependencies {
...@@ -66,11 +50,13 @@ dependencies { ...@@ -66,11 +50,13 @@ dependencies {
api 'com.github.princekin-f:EasyFloat:1.3.2' api 'com.github.princekin-f:EasyFloat:1.3.2'
api rootProject.ext.dependencies["ydl-user-router"] api rootProject.ext.dependencies["ydl-user-router"]
implementation project(":ydl-resource")
if (rootProject.ext.dev_mode){ if (rootProject.ext.dev_mode){
//开发时使用 //开发时使用
implementation project(":api:consultant") implementation project(":api:consultant")
implementation modularPublication('com.ydl:m-user-api') implementation modularPublication('com.ydl:m-user-api')
implementation project(":api:dynamic") implementation project(":api:dynamic")
implementation project(":api:course")
api project(":ydl-webview") api project(":ydl-webview")
api project(":ydl-platform") api project(":ydl-platform")
api project(":ydl-media") api project(":ydl-media")
...@@ -82,6 +68,7 @@ dependencies { ...@@ -82,6 +68,7 @@ dependencies {
compileOnly rootProject.ext.dependencies["ydl-m-user-api"] compileOnly rootProject.ext.dependencies["ydl-m-user-api"]
compileOnly rootProject.ext.dependencies["ydl-m-dynamic-api"] compileOnly rootProject.ext.dependencies["ydl-m-dynamic-api"]
compileOnly rootProject.ext.dependencies['ydl-m-consultant-api'] compileOnly rootProject.ext.dependencies['ydl-m-consultant-api']
compileOnly rootProject.ext.dependencies['ydl-m-course-api']
// compileOnlyrootProject.ext.dependencies['com.ydl:m-consultant-api'] // compileOnlyrootProject.ext.dependencies['com.ydl:m-consultant-api']
api rootProject.ext.dependencies["ydl-webview"] api rootProject.ext.dependencies["ydl-webview"]
api (rootProject.ext.dependencies["ydl-media"]){ api (rootProject.ext.dependencies["ydl-media"]){
......
modular {
//模块包名
packageName "com.ydl.course"
// 模块发布需要的参数
publish {
modules {
xlzx {
groupId = "com.ydl"
artifactId = "m-course-module-xlzx"
// 上报的 心理咨询 业务模块 aar 包的版本号
version = rootProject.ext.ydlPublishVersion[childProject.getName()]
}
ydl{
groupId = "com.ydl"
artifactId = "m-course-module-ydl"
// 上报的 壹点灵 业务模块 aar 包的版本号
version = rootProject.ext.ydlPublishVersion[childProject.getName()]
}
}
api {
// 壹点灵/心理咨询 业务模块 API层 jar包的发布信息
groupId = "com.ydl"
artifactId = "m-course-api"
//开发时注释掉版本号,发布api时打开
version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
// API 层打包时需要引入的依赖
apiDependencies {
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
...@@ -81,7 +81,7 @@ dependencies { ...@@ -81,7 +81,7 @@ dependencies {
implementation modularPublication('com.ydl:m-user-api') implementation modularPublication('com.ydl:m-user-api')
implementation project(":api:dynamic") implementation project(":api:dynamic")
implementation modularPublication('com.ydl:m-tests-api') implementation modularPublication('com.ydl:m-tests-api')
implementation modularPublication('com.ydl:m-course-api') implementation project(":api:course")
implementation project(":api:fm") implementation project(":api:fm")
implementation project(":api:consultant") implementation project(":api:consultant")
implementation project(':api:confide') implementation project(':api:confide')
......
...@@ -100,7 +100,7 @@ dependencies { ...@@ -100,7 +100,7 @@ dependencies {
implementation modularPublication('com.ydl:m-user-api') implementation modularPublication('com.ydl:m-user-api')
implementation project(":api:dynamic") implementation project(":api:dynamic")
implementation modularPublication('com.ydl:m-tests-api') implementation modularPublication('com.ydl:m-tests-api')
implementation modularPublication('com.ydl:m-course-api') implementation project(":api:course")
implementation project(":api:fm") implementation project(":api:fm")
implementation project(":api:consultant") implementation project(":api:consultant")
implementation project(':api:confide') implementation project(':api:confide')
......
...@@ -89,7 +89,7 @@ dependencies { ...@@ -89,7 +89,7 @@ dependencies {
api project(":ydl-pay") api project(":ydl-pay")
// implementation project(":ydl-tuicore") // implementation project(":ydl-tuicore")
implementation modularPublication('com.ydl:m-user-api') implementation modularPublication('com.ydl:m-user-api')
implementation modularPublication('com.ydl:m-course-api') implementation project(":api:course")
implementation modularPublication('com.ydl:m-im-api') implementation modularPublication('com.ydl:m-im-api')
implementation project(":api:fm") implementation project(":api:fm")
implementation project(":api:dynamic") implementation project(":api:dynamic")
......
...@@ -4,4 +4,5 @@ include ':app', ...@@ -4,4 +4,5 @@ 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', ':api:confide', ':api:dynamic', ':api:fm',':api:consultant' include ':ydl-tuicore', ':api:confide', ':api:dynamic', ':api:fm',':api:consultant',
':api:course'
...@@ -7,14 +7,21 @@ android { ...@@ -7,14 +7,21 @@ android {
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 28 targetSdkVersion 28
flavorDimensions "versionCode"//Flavor 维度信息 // flavorDimensions "versionCode"//Flavor 维度信息
} }
productFlavors { // productFlavors {
ydl {} // ydl {}
xlzx {} // xlzx {}
// }
sourceSets {
main {
res.srcDirs = [
'src/main/res',
'src/ydl/res'
]
}
} }
buildTypes { buildTypes {
release { release {
minifyEnabled false minifyEnabled false
......
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