tree: d66eaf90c94d8bf1dfc241300edfc53cce6489b0 [path history] [tgz]
  1. gradle/
  2. license/
  3. sdk/
  4. .gitignore
  5. build.gradle
  6. codeStyleSettings.xml
  7. gradle.properties
  8. gradlew
  9. gradlew.bat
  10. jacoco.gradle
  11. README.md
  12. settings.gradle
android/README.md

Build from source

Install gradlew

See https://gradle.org/install#with-a-package-manager

Build Weex

run ./gradlew clean assembleRelease to build weex_sdk

Build Types

For historical reason, the java files of weex_sdk was under the package name of com.taobao.weex, despite the fact that they are under org.apache.weex now.

In order to provide backward compatibility for users, there are two type of convince binary of Weex generated by different building argument.

weex_sdk

weex_sdk is the library we give officially support now, where all java files in .aar is under org.apache.weex.

New users of Weex should always choose weex_sdk, while for existing users, using weex_sdk could cause compiling issues and you could use weex_sdk_legacy for temporary solution. See below for detail.

weex_sdk_legacy

weex_sdk_legacy is provided only for backward compatibility reason, and would not be maintained in the future. Please migrate to weex_sdk when you are available.

weex_sdk_legacy is built by ./gradlew clean assembleRelease -PapachePackageName="false", where all java files in .aar is under com.taobao.weex

Android-Studio integrated

Double type SHIFT and enter Build Variants, will give you build variants window.

  • Select apacheRelease in the dropdown window of Active Build Variants to enable Android-Studio integrated for files under org.apache.weex
  • Select legacyRelease or release in the dropdown window of Active Build Variants to enable Android-Studio integrated for files under com.taobao.weex

The submodule weex-playground

Weex Playground can be used to test and preview weex pages on Android and it has been added as a submodule.

Relationship between weex and playground

  • The playground submodule will be cloned and updated automatically when developers clone the ‘incubator-weex’ repo and build it.In this case, playground project will implement the source code of weex-sdk.
  • When developer directly clone the ‘weex-playground’ repo and run it separately, the playground project will implement a corresponding aar version of weex-sdk.

When to publish SNAPSHOT

When some commits of playground rely on unpublished features of weex-sdk,a SNAPSHOT of weex-sdk will be needed to support it.

How to publish SNAPSHOT

cd android
./gradlew clean install ArtifactoryPublish -PgroupId="org.apache.weex" -PartifactName="sdk_legacy" -PapachePackageName="false" -PunbundlingJSC="true" -PbuildRuntimeApi=true -PweexVersion=$PUBLISH_VERSION -PbintrayUser=weex -PbintrayApiKey=$JCENTER_TOKEN