mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-14 19:20:29 +03:00
import: make it work most of the time with git repos
This includes real tests too.
This commit is contained in:
parent
e049a120f8
commit
bfe587979d
28 changed files with 1184 additions and 42 deletions
|
|
@ -0,0 +1,2 @@
|
|||
configurations.maybeCreate("default")
|
||||
artifacts.add("default", file('avenginekit.aar'))
|
||||
41
tests/source-files/cn.wildfirechat.chat/build.gradle
Normal file
41
tests/source-files/cn.wildfirechat.chat/build.gradle
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.4.2'
|
||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
maven {
|
||||
url "http://developer.huawei.com/repo/"
|
||||
}
|
||||
|
||||
maven { url 'https://jitpack.io' }
|
||||
maven { url 'https://dl.bintray.com/jenly/maven' }
|
||||
}
|
||||
configurations {
|
||||
all {
|
||||
resolutionStrategy {
|
||||
//force "android.arch.lifecycle:runtime:1.1.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
115
tests/source-files/cn.wildfirechat.chat/chat/build.gradle
Normal file
115
tests/source-files/cn.wildfirechat.chat/chat/build.gradle
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
signingConfigs {
|
||||
wfc {
|
||||
keyAlias 'wfc'
|
||||
keyPassword 'wildfirechat'
|
||||
storeFile file('../wfc.keystore')
|
||||
storePassword 'wildfirechat'
|
||||
}
|
||||
}
|
||||
compileSdkVersion 28
|
||||
aaptOptions.cruncherEnabled = false
|
||||
aaptOptions.useNewCruncher = false
|
||||
defaultConfig {
|
||||
applicationId "cn.wildfirechat.chat"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 28 //当targetversion大于23时,需要使用fileprovider
|
||||
versionCode 23
|
||||
versionName "0.6.9"
|
||||
multiDexEnabled true
|
||||
javaCompileOptions {
|
||||
annotationProcessorOptions {
|
||||
includeCompileClasspath true
|
||||
}
|
||||
}
|
||||
signingConfig signingConfigs.wfc
|
||||
|
||||
// buildConfigField("String", "BuglyId", '"34490ba79f"')
|
||||
|
||||
ndk {
|
||||
abiFilters "armeabi-v7a", 'x86', 'x86_64' // ,'armeabi', 'arm64-v8a', 'x86', 'x86_64'
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
signingConfig signingConfigs.wfc
|
||||
}
|
||||
debug {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
signingConfig signingConfigs.wfc
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
sourceSets {
|
||||
main {
|
||||
// wfc kit start
|
||||
jniLibs.srcDirs += ['libs', 'kit/libs']
|
||||
res.srcDirs += ['kit/src/main/res', 'kit/src/main/res-av']
|
||||
assets.srcDirs += ['kit/src/main/assets']
|
||||
java.srcDirs += ['kit/src/main/java']
|
||||
// wfc kit end
|
||||
}
|
||||
}
|
||||
productFlavors {
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility 1.8
|
||||
targetCompatibility 1.8
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation files('libs/TencentLocationSDK_v4.9.7.12_r247861_161205_1104.jar')
|
||||
implementation files('libs/TencentMapSDK_Raster_v_1.2.7_51ae0e7.jar')
|
||||
implementation files('libs/TencentSearch1.1.3.jar')
|
||||
|
||||
implementation 'com.tencent.bugly:crashreport:2.8.6.0'
|
||||
implementation 'com.tencent.bugly:nativecrashreport:3.6.0.1'
|
||||
implementation 'com.lqr.adapter:library:1.0.2'
|
||||
implementation 'com.jaeger.statusbaruitl:library:1.3.5'
|
||||
implementation project(':push')
|
||||
|
||||
// wfc kit start
|
||||
implementation fileTree(include: ['*.jar'], dir: 'kit/libs')
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0-beta01'
|
||||
implementation 'com.google.android.material:material:1.1.0-alpha10'
|
||||
implementation 'cjt.library.wheel:camera:1.1.9'
|
||||
implementation 'com.kyleduo.switchbutton:library:1.4.4'
|
||||
implementation 'com.squareup.okhttp3:okhttp:3.11.0'
|
||||
implementation 'com.squareup.okio:okio:1.14.0'
|
||||
implementation 'com.jakewharton:butterknife:10.2.0'
|
||||
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.0'
|
||||
implementation 'com.github.bumptech.glide:glide:4.8.0'
|
||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
|
||||
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
|
||||
implementation 'org.webrtc:google-webrtc:1.0.21929'
|
||||
implementation 'com.afollestad.material-dialogs:core:0.9.6.0'
|
||||
implementation 'q.rorbin:badgeview:1.1.3'
|
||||
implementation 'com.google.code.gson:gson:2.8.5'
|
||||
|
||||
// ViewModel and LiveData
|
||||
def lifecycle_version = '2.2.0-alpha05'
|
||||
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
|
||||
|
||||
implementation project(':client')
|
||||
implementation project(':avenginekit')
|
||||
implementation project(':emojilibrary')
|
||||
implementation project(':imagepicker')
|
||||
|
||||
implementation 'com.king.zxing:zxing-lite:1.1.1'
|
||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0'
|
||||
// kit wfc end
|
||||
}
|
||||
57
tests/source-files/cn.wildfirechat.chat/client/build.gradle
Normal file
57
tests/source-files/cn.wildfirechat.chat/client/build.gradle
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'com.github.dcendents.android-maven'
|
||||
|
||||
group = 'com.github.wildfirechat'
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 28
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
// testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
ndk {
|
||||
// TODO: changes this for your application if needed
|
||||
moduleName = "mmnet"
|
||||
//abiFilter "armeabi" //去掉armeabi架构,armeabi-v7a可以兼容armeabi架构。
|
||||
abiFilter "armeabi-v7a"
|
||||
abiFilter "arm64-v8a"
|
||||
abiFilter "x86"
|
||||
abiFilter "x86_64"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
jniLibs.srcDirs = ['libs']
|
||||
}
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
compileOptions {
|
||||
targetCompatibility 1.8
|
||||
sourceCompatibility 1.8
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
dependencies {
|
||||
api project(':mars-core-release')
|
||||
def lifecycle_version = '2.0.0-beta01'
|
||||
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="cn.wildfirechat.client">
|
||||
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<uses-permission android:name="android.permission.GET_TASKS" />
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
||||
|
||||
<application>
|
||||
<service
|
||||
android:name="cn.wildfirechat.client.ClientService"
|
||||
android:process=":marsservice" />
|
||||
<receiver
|
||||
android:name="com.tencent.mars.BaseEvent$ConnectionReceiver"
|
||||
android:process=":marsservice" />
|
||||
|
||||
<!--must run in th main process-->
|
||||
<receiver android:name="cn.wildfirechat.remote.RecoverReceiver" />
|
||||
</application>
|
||||
</manifest>
|
||||
34
tests/source-files/cn.wildfirechat.chat/emojilibrary/build.gradle
Executable file
34
tests/source-files/cn.wildfirechat.chat/emojilibrary/build.gradle
Executable file
|
|
@ -0,0 +1,34 @@
|
|||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 28
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
def checkExecResult(execResult) {
|
||||
if (execResult) {
|
||||
if (execResult.getExitValue() != 0) {
|
||||
throw new GradleException('Non-zero exit value: ' + execResult.getExitValue())
|
||||
}
|
||||
|
||||
} else {
|
||||
throw new GradleException('Returned a null execResult object')
|
||||
}
|
||||
}
|
||||
|
||||
task buildLibrariesForAndroid(type: Exec) {
|
||||
workingDir '../'
|
||||
|
||||
def sdkDir = System.env.ANDROID_HOME
|
||||
def ndkDir = System.env.ANDROID_NDK_HOME
|
||||
|
||||
if (rootProject.file("local.properties").exists()) {
|
||||
Properties properties = new Properties()
|
||||
properties.load(project.rootProject.file('local.properties').newDataInputStream())
|
||||
sdkDir = properties.getProperty('sdk.dir')
|
||||
ndkDir = properties.getProperty('ndk.dir')
|
||||
}
|
||||
|
||||
def path = System.env.PATH
|
||||
|
||||
def envMap = [
|
||||
'ANDROID_HOME' : sdkDir,
|
||||
'ANDROID_NDK_HOME': ndkDir,
|
||||
'_ARCH_' : 'armeabi',
|
||||
'PATH' : ndkDir,
|
||||
]
|
||||
environment envMap
|
||||
|
||||
print envMap
|
||||
|
||||
commandLine 'python', 'build_android.py', '2', 'armeabi'
|
||||
|
||||
doLast {
|
||||
checkExecResult(execResult)
|
||||
}
|
||||
}
|
||||
30
tests/source-files/cn.wildfirechat.chat/imagepicker/build.gradle
Executable file
30
tests/source-files/cn.wildfirechat.chat/imagepicker/build.gradle
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 28
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
|
||||
implementation 'com.github.chrisbanes.photoview:library:1.2.4'
|
||||
implementation 'com.github.bumptech.glide:glide:4.8.0'
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
configurations.maybeCreate("default")
|
||||
artifacts.add("default", file('mars-core-release.aar'))
|
||||
55
tests/source-files/cn.wildfirechat.chat/push/build.gradle
Normal file
55
tests/source-files/cn.wildfirechat.chat/push/build.gradle
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 28
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
manifestPlaceholders = [
|
||||
|
||||
MI_APP_ID : "2882303761517722456",
|
||||
MI_APP_KEY : "5731772292456",
|
||||
|
||||
HMS_APP_ID : "100221325",
|
||||
|
||||
MEIZU_APP_ID : "113616",
|
||||
MEIZU_APP_KEY: "fcd886f51c144b45b87a67a28e2934d1",
|
||||
|
||||
VIVO_APP_ID : "12918",
|
||||
VIVO_APP_KEY : "c42feb05-de6c-427d-af55-4f902d9e0a75"
|
||||
]
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility 1.8
|
||||
targetCompatibility 1.8
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation 'com.huawei.android.hms:push:2.5.3.305'
|
||||
implementation 'com.huawei.android.hms:base:2.5.3.305'
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
|
||||
implementation project(':client')
|
||||
implementation 'com.meizu.flyme.internet:push-internal:3.4.2@aar'
|
||||
|
||||
def lifecycle_version = '2.2.0-alpha05'
|
||||
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
|
||||
}
|
||||
7
tests/source-files/cn.wildfirechat.chat/settings.gradle
Normal file
7
tests/source-files/cn.wildfirechat.chat/settings.gradle
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
include ':client',
|
||||
':push',
|
||||
':chat',
|
||||
':mars-core-release',
|
||||
':emojilibrary',
|
||||
':imagepicker',
|
||||
':avenginekit'
|
||||
Loading…
Add table
Add a link
Reference in a new issue