Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
wrmswindmill committed Jul 24, 2019
1 parent ddd48f7 commit efc4614
Show file tree
Hide file tree
Showing 4 changed files with 266 additions and 185 deletions.
87 changes: 53 additions & 34 deletions android/sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
plugins {
id "com.github.hierynomus.license" version "0.14.0"
id 'com.jfrog.artifactory' version '4.9.7'
}

apply plugin: 'com.android.library'
Expand Down Expand Up @@ -47,13 +48,13 @@ checkstyle {
toolVersion = '6.9'
}

version = project.hasProperty('weexVersion') ? project.getProperty('weexVersion') : "0.20.0.1"
version = project.hasProperty('weexVersion') ? project.getProperty('weexVersion') : '0.26.0.1'

//Check version, the version must have 4 sections. The leading three section must be number, and the last section is odd number with or without suffix string.
if (!project.hasProperty('ignoreVersionCheck') || !project.getProperty('ignoreVersionCheck').equals("true")) {
version.tokenize('.').eachWithIndex { it, i ->
if (i < 3) {
assert it.isNumber() : "Please use semantic versioning witch 4 sections, you are using ${$ { i } + 1} section instead."
assert it.isNumber() : "Please use semantic versioning witch 4 sections, you are using ${${i} + 1} section instead."
} else if (i == 3) {
it.split("[-_]").toList().eachWithIndex { inner_it, inner_i ->
if (inner_i == 0) {
Expand All @@ -63,14 +64,13 @@ if (!project.hasProperty('ignoreVersionCheck') || !project.getProperty('ignoreVe
}
}.size == 4
} else {
assert false: "Please use semantic versioning witch 4 sections, you are using ${$ { i } + 1} section instead."
assert false: "Please use semantic versioning witch 4 sections, you are using ${${i} + 1} section instead."
}
}
}

android {
compileSdkVersion project.compileSdkVersion
// buildToolsVersion project.buildToolsVersion
resourcePrefix "weex"
useLibrary 'org.apache.http.legacy'
if(project.hasProperty('removeSharedLib') && "true".equals(project.getProperty('removeSharedLib'))) {
Expand Down Expand Up @@ -117,6 +117,8 @@ android {

def android_project_dir = projectDir

def buildRuntimeApi = project.hasProperty('buildRuntimeApi') ? project.property('buildRuntimeApi') : false

defaultConfig {
buildConfigField "String", "buildJavascriptFrameworkVersion", "\"${jsfmVersion}\""
buildConfigField "String", "buildVersion", "\"${version}\""
Expand All @@ -129,7 +131,7 @@ android {
versionName project.version
ndk {
if(!project.hasProperty('supportArmeabi-v7a') || "false" != project.getProperty('supportArmeabi-v7a')){
abiFilters 'arm64-v8a'
abiFilters 'armeabi-v7a'
}

if(!project.hasProperty('supportArm64-v8a') || "false" != project.getProperty('supportArm64-v8a')){
Expand All @@ -147,7 +149,8 @@ android {
'-DANDROID_STL=' + "${cxx_stl}",
'-DCMAKE_BUILD_TYPE=Release',
'-DANDROID_PROJECT_DIR=' + "${android_project_dir}",
'-DENABLE_ASAN=false'
'-DENABLE_ASAN=false',
'-DBUILD_RUNTIME_API='+"${buildRuntimeApi}"
}
}
}
Expand Down Expand Up @@ -228,34 +231,35 @@ dependencies {
testImplementation 'org.json:json:20160212'
}

if(file('../license/LICENSE').exists()){
license {
header = file('../license/LICENSE')
mapping('cpp','JAVADOC_STYLE')
mapping('h','JAVADOC_STYLE')
excludes(['com/taobao/weex/utils/WXDataStructureUtil.java'])
}

task weex_core_license(type: com.hierynomus.gradle.license.tasks.LicenseFormat){
source = fileTree(dir:"../../weex_core").include(['**/*.h','**/*.cpp', '**/*.cc', '**/*.c']).
exclude(['Source/rapidjson/**/*.h','Source/rapidjson/**/*.cpp',
'Source/android/base/base64/**/*.h','Source/android/base/base64/**/*.cpp',
'Source/android/jniprebuild/jniheader/*.h',
'Source/base/Compatible.cpp',
'Source/IPC/**/*.h','Source/IPC/**/*.cpp', 'Source/IPC/**/*.c',
'Source/base/third_party/icu/*.h',
'Source/base/third_party/icu/*.cpp',
'Source/android/jsengine/dependence/**/*.h',
'Source/android/jsengine/dependence/**/*.cpp',
'Source/include/wtf/**/*.h',
'Source/include/wtf/**/*.c',
'Source/include/wtf/**/*.cpp',
'Source/include/JavaScriptCore/**/*.h',
'Source/include/JavaScriptCore/**/*.c',
'Source/include/JavaScriptCore/**/*.cpp'])
}
preBuild.dependsOn licenseFormat
}
if(file('../license/LICENSE').exists()){
license {
header = file('../license/LICENSE')
mapping('cpp','JAVADOC_STYLE')
mapping('h','JAVADOC_STYLE')
excludes(['com/taobao/weex/utils/WXDataStructureUtil.java'])
}

task weex_core_license(type: com.hierynomus.gradle.license.tasks.LicenseFormat){
source = fileTree(dir:"../../weex_core").include(['**/*.h','**/*.cpp', '**/*.cc', '**/*.c']).
exclude(['Source/rapidjson/**/*.h','Source/rapidjson/**/*.cpp',
'Source/android/jniprebuild/jniheader/*.h',
'Source/base/Compatible.cpp',
'Source/IPC/**/*.h','Source/IPC/**/*.cpp', 'Source/IPC/**/*.c',
'Source/base/base64/modp_base64/**/*.h',
'Source/base/base64/modp_base64/**/*.cc',
'Source/base/third_party/icu/*.h',
'Source/base/third_party/icu/*.cpp',
'Source/android/jsengine/dependence/**/*.h',
'Source/android/jsengine/dependence/**/*.cpp',
'Source/include/wtf/**/*.h',
'Source/include/wtf/**/*.c',
'Source/include/wtf/**/*.cpp',
'Source/include/JavaScriptCore/**/*.h',
'Source/include/JavaScriptCore/**/*.c',
'Source/include/JavaScriptCore/**/*.cpp'])
}
preBuild.dependsOn licenseFormat
}

task checkNdkVersion() {
def rootDir = project.rootDir
Expand Down Expand Up @@ -338,6 +342,21 @@ bintray {
}
}
}
artifactory {
contextUrl = 'http://oss.jfrog.org/artifactory'
publish {
repository {
repoKey = 'oss-snapshot-local'
username = bintray.user
password = bintray.key
maven = true
}
defaults {
publishConfigs('archives')
}
}
}


afterEvaluate { project ->
transformNativeLibsWithStripDebugSymbolForRelease << {
Expand Down
Loading

0 comments on commit efc4614

Please sign in to comment.