Commit 99ddc361 by 万齐军

feat: dynamic改造

parent 6ce6a104
/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.dynamic.api">
</manifest>
\ No newline at end of file
package com.yidianling.dynamic.api
import android.app.Activity
import android.content.Intent
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import com.alibaba.android.arouter.facade.template.IProvider
import java.io.File
interface IDynamicService : IProvider {
fun membersIntent(activity: Activity, userId: String): Intent
fun replyInfoIntent(activity: Activity, replyId: String, aid: String): Intent
fun trendsDetailIntent(activity: Activity, trendId: Int): Intent
fun trendsDetailIntent(activity: Activity, trendId: Int, isScrollToZan: Boolean): Intent
fun trendsDetailIntent(activity: Activity, trendId: Int, isScrollToZan: Boolean, lastId: Int): Intent
fun startTrendsDetail(activity: Activity, trendId: Int, isSplash: Boolean, isComment: Boolean, isScrollToZan: Boolean, isScrollToComment: Boolean, lastId: Int)
fun publishTrendIntent(activity: Activity, url: String, cover: String, title: String): Intent
fun publishTrendIntent(activity: Activity): Intent
fun publishFmToTrend(activity: Activity, url: String, cover: String, title: String): Intent
fun topicDetailIntent(context: Activity, isSplash: Boolean, topicId: String): Intent
fun publishArticleToTrend(activity: Activity, url: String, cover: String, title: String): Intent
fun getBrosePictureActivityIntent(activity: Activity): Intent
fun getMyTrendsActivityIntent(activity: Activity): Intent
fun getTrendsHomeFragment(tabIndex: String): Fragment
fun getPublicPicBrowType(): Int
fun imageCompressScal(activity: FragmentActivity, path: String, size: Int): File
}
\ No newline at end of file
package com.yidianling.dynamic.event;
/**
* Created by softrice on 16/1/5.
*/
public class ThankReplyUpdateEvent {
}
......@@ -49,7 +49,6 @@ ext {
"m-user-api" : "0.0.10.24",
"m-home-api" : "0.0.4.4",
"m-im-api" : "0.0.12.24",
"m-dynamic-api" : "0.0.3.71",
]
ydl_app = [
appName : "壹点灵心理咨询",
......@@ -126,7 +125,6 @@ ext {
//-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.6",
"m-confide-api" : "1.0.0",
"m-consultant-api": "0.0.5.63",
"m-course-api" : "0.0.3.6",
"m-fm-api" : "0.0.3",
......@@ -135,7 +133,6 @@ ext {
"m-user-api" : "0.0.10.24",
"m-home-api" : "0.0.4.4",
"m-im-api" : "0.0.12.24",
"m-dynamic-api" : "0.0.3.71",
]
dependencies = [
......@@ -304,8 +301,8 @@ ext {
"ydl-m-im-api" : "com.ydl:m-im-api:${ydlCompileVersion["m-im-api"]}",
"ydl-m-home-api" : "com.ydl:m-home-api:${ydlCompileVersion["m-home-api"]}",
"ydl-m-consultant-api" : "com.ydl:m-consultant-api:${ydlCompileVersion["m-consultant-api"]}",
"ydl-m-dynamic-api" : "com.ydl:m-dynamic-api:${ydlCompileVersion["m-dynamic-api"]}",
"ydl-m-confide-api" : "com.ydl:m-confide-api:${ydlCompileVersion["m-confide-api"]}",
"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-course-api" : "com.ydl:m-course-api:${ydlCompileVersion["m-course-api"]}",
]
......
......@@ -70,7 +70,7 @@ dependencies {
//开发时使用
implementation modularPublication('com.ydl:m-consultant-api')
implementation modularPublication('com.ydl:m-user-api')
implementation modularPublication('com.ydl:m-dynamic-api')
implementation project(":api:dynamic")
api project(":ydl-webview")
api project(":ydl-platform")
api project(":ydl-media")
......
......@@ -96,7 +96,7 @@ dependencies {
api project(":ydl-pay")
implementation modularPublication('com.ydl:m-im-api')
implementation modularPublication('com.ydl:m-user-api')
implementation modularPublication('com.ydl:m-dynamic-api')
implementation project(":api:dynamic")
implementation modularPublication('com.ydl:m-tests-api')
implementation modularPublication('com.ydl:m-course-api')
implementation modularPublication('com.ydl:m-fm-api')
......
modular {
//模块包名
packageName "com.yidianling.dynamic"
// 模块发布需要的参数
publish {
modules {
xlzx {
groupId = "com.ydl"
artifactId = "m-dynamic-module-xlzx"
// 上报的 心理咨询 业务模块 aar 包的版本号
version = rootProject.ext.ydlPublishVersion[childProject.getName()]
}
ydl{
groupId = "com.ydl"
artifactId = "m-dynamic-module-ydl"
// 上报的 壹点灵 业务模块 aar 包的版本号
version = rootProject.ext.ydlPublishVersion[childProject.getName()]
}
}
api {
//壹点灵/心理咨询 业务模块 API层 jar包的发布信息
groupId = "com.ydl"
artifactId = "m-dynamic-api"
//开发时注释掉版本号,发布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
package com.yidianling.dynamic
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.Assert.*
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getTargetContext()
assertEquals("com.yidianling.dynamic", appContext.packageName)
}
}
package com.yidianling.dynamic
import org.junit.Test
import org.junit.Assert.*
/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}
<?xml version="1.0" encoding="utf-8"?>
<resources>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
</resources>
......@@ -74,7 +74,7 @@ dependencies {
//开发时使用
api project(":ydl-platform")
implementation modularPublication('com.ydl:m-user-api')
implementation modularPublication('com.ydl:m-dynamic-api')
implementation project(":api:dynamic")
implementation project(':ydl-media')
} else {
//发布时使用
......
......@@ -98,7 +98,7 @@ dependencies {
api project(':ydl-platform')
implementation modularPublication('com.ydl:m-im-api')
implementation modularPublication('com.ydl:m-user-api')
implementation modularPublication('com.ydl:m-dynamic-api')
implementation project(":api:dynamic")
implementation modularPublication('com.ydl:m-tests-api')
implementation modularPublication('com.ydl:m-course-api')
implementation modularPublication('com.ydl:m-fm-api')
......
......@@ -78,7 +78,7 @@ dependencies {
implementation project(':ydl-flutter-base')
implementation modularPublication('com.ydl:m-test-api')
implementation modularPublication('com.ydl:m-user-api')
implementation modularPublication('com.ydl:m-dynamic-api')
implementation project(":api:dynamic")
implementation modularPublication('com.ydl:m-im-api')
}else {
//发布时使用
......
......@@ -92,7 +92,7 @@ dependencies {
implementation modularPublication('com.ydl:m-course-api')
implementation modularPublication('com.ydl:m-im-api')
implementation modularPublication('com.ydl:m-fm-api')
implementation modularPublication('com.ydl:m-dynamic-api')
implementation project(":api:dynamic")
implementation modularPublication('com.ydl:m-consultant-api')
}else {
//发布时使用
......
......@@ -32,7 +32,7 @@ afterEvaluate { project ->
// log
println String.format(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n>>>>> [%s] 正在将[%s]版本的[%s]包上传到Maven的[%s]仓库 >>>>>\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
, project.getName()
, getVersionName()
, project.version
, "aar"
, "release"
)
......
......@@ -4,4 +4,4 @@ include ':app',
':m-home',
':m-consultant', ':m-muse', ':m-fm', ':m-tests', ":m-course",
":m-im",":m-dynamic","m-article","m-audioim","m-user","m-confide"
include ':ydl-tuicore',':api:confide'
include ':ydl-tuicore',':api:confide',':api:dynamic'
......@@ -59,7 +59,7 @@ dependencies {
//开发时使用
api project(':ydl-platform')
implementation modularPublication('com.ydl:m-user-api')
implementation modularPublication('com.ydl:m-dynamic-api')
implementation project(":api:dynamic")
implementation modularPublication('com.ydl:m-im-api')
} else {
//发布时使用
......
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