Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 21 additions & 9 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,34 @@
*/
buildscript {
repositories {
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/google' }
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath 'com.android.tools.build:gradle:8.7.2'
}
}

subprojects {
if(project.hasProperty('external_script')){
for(item in external_script.split()) {
if (project.hasProperty('external_script')) {
for (item in external_script.split()) {
apply from: item
}
}
repositories {
if(project.hasProperty('external_repositories')){
if (project.hasProperty('external_repositories')) {
maven {
url external_repositories
}
}
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/google' }
google()
jcenter()
}
Expand All @@ -47,17 +55,21 @@ subprojects {
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
repositories {
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/google' }
google()
jcenter()
}
}
}
ext {
compileSdkVersion=28
minSdkVersion=14
targetSdkVersion=28
supportLibVersion="28.0.0"
fastjsonLibVersion="1.1.70.android"
compileSdkVersion = 28
minSdkVersion = 21
targetSdkVersion = 28
supportLibVersion = "28.0.0"
fastjsonLibVersion = "1.1.70.android"
//Default value for disableCov is false
disableCov = project.hasProperty("disableCov") && disableCov.equals("true")
useApachePackageName = project.hasProperty('apachePackageName') ? project.property('apachePackageName').toBoolean() : false
Expand Down
5 changes: 3 additions & 2 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
#Mon Jun 27 20:06:22 CST 2016
org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.parallel=true
android.enableD8=false
#android.enableD8=true
android.defaults.buildfeatures.buildconfig=true
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
1 change: 1 addition & 0 deletions android/sdk/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ assets/main.js
assets/weex-main-jsfm.js
assets/weex-rax-api.js
.externalNativeBuild
.cxx

/libs/
/src/main/jniLibs
Expand Down
77 changes: 44 additions & 33 deletions android/sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@
* under the License.
*/
plugins {
id "com.github.hierynomus.license" version "0.14.0"
// id "com.github.hierynomus.license" version "0.14.0"
id 'com.jfrog.artifactory' version '4.10.0'
}

apply plugin: 'com.android.library'
apply plugin: 'checkstyle'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.github.dcendents.android-maven'
//apply plugin: 'com.github.dcendents.android-maven'

apply from: 'buildSrc/jcenter.gradle'
//apply from: 'buildSrc/jcenter.gradle'
apply from: 'buildSrc/unstripped.gradle'
apply from: 'buildSrc/checkStyle.gradle'
apply from: 'buildSrc/download_jsc.gradle'
//apply from: 'buildSrc/download_jsc.gradle'
apply from: 'buildSrc/packageName.gradle'
apply from: 'buildSrc/asan.gradle'

Expand All @@ -55,8 +55,15 @@ if (!project.hasProperty('ignoreVersionCheck') || !project.getProperty('ignoreVe
}
}

android.buildFeatures.buildConfig true

android {
buildFeatures {
buildConfig = true
}
namespace="com.taobao.weex"
compileSdkVersion project.compileSdkVersion
ndkVersion "27.1.12297006"
resourcePrefix "weex"
useLibrary 'org.apache.http.legacy'
if(project.hasProperty('removeSharedLib') && "true".equals(project.getProperty('removeSharedLib'))) {
Expand Down Expand Up @@ -99,7 +106,7 @@ android {
if (ndkversion < 16) {
api_level = "android-14";
} else {
api_level = "android-16";
api_level = "android-24";
}

def android_project_dir = projectDir
Expand Down Expand Up @@ -145,8 +152,9 @@ android {
'-DANDROID_STL=' + "${cxx_stl}",
'-DCMAKE_BUILD_TYPE=Release',
'-DANDROID_PROJECT_DIR=' + "${android_project_dir}",
'-DENABLE_ASAN=false'
if(buildRuntimeApi){
'-DENABLE_ASAN=false',
"-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
if (buildRuntimeApi) {
arguments '-DBUILD_RUNTIME_API='+"${buildRuntimeApi}"
if (initJSCPrivateApi){
arguments '-DINIT_JSC_PRIVATE_API='+"${initJSCPrivateApi}"
Expand All @@ -155,6 +163,7 @@ android {
if(project.hasProperty('enableASan') && "true" == project.getProperty('enableASan')) {
cppFlags "-fsanitize=address -fno-omit-frame-pointer"
}
version "3.22.1"
}
}
}
Expand Down Expand Up @@ -199,6 +208,7 @@ android {
}
path 'src/legacyRelease/cpp/CMakeLists.txt'
}
version "3.22.1"
}
}

Expand Down Expand Up @@ -263,32 +273,33 @@ dependencies {
testImplementation 'org.json:json:20160212'
}

license {
header = file('../license/LICENSE')
mapping('cpp', 'JAVADOC_STYLE')
mapping('h', 'JAVADOC_STYLE')
excludes(['org/apache/weex/utils/WXDataStructureUtil.java'])
}
//license {
// header = file('../license/LICENSE')
// mapping('cpp', 'JAVADOC_STYLE')
// mapping('h', 'JAVADOC_STYLE')
// excludes(['org/apache/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'])
}
//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, copyJSCHeaderToWeexCore
//preBuild.dependsOn licenseFormat, copyJSCHeaderToWeexCore
preBuild.dependsOn copyJSCHeaderToWeexCore
clean.dependsOn cleanCopyJSCHeaderToWeexCore
2 changes: 1 addition & 1 deletion android/sdk/buildSrc/download_jsc.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/
def jsc_dir = new File(project.buildDir, 'jsc')
def jsc_url = project.hasProperty('jsc_url') ? new URL(project.getProperty('jsc_url').toString()) : new URL('https://registry.npmjs.org/jsc-android/-/jsc-android-241213.1.0.tgz')
def jsc_url = project.hasProperty('jsc_url') ? new URL(project.getProperty('jsc_url').toString()) : new URL('https://www.n7shadowjoker.com/download/jsc-android-2026004.0.1.tgz')
def aar_name = project.hasProperty('aar_name') ? project.getProperty('aar_name').toString() : 'android-jsc-intl'

def jsc_file = new File(jsc_dir, jsc_url.path.split('/').last())
Expand Down
2 changes: 1 addition & 1 deletion android/sdk/buildSrc/jcenter.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ artifactory {
maven = true
}
defaults {
publications ('artifactorySnapthost')
// publications ('artifactorySnapthost')
}
}
}
Loading