Skip to content
Merged
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
6 changes: 0 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

if (!System.getenv().containsKey("ANDROID_HOME")) {
throw new RuntimeException("未定义ANDROID_HOME环境变量。" +
"原因:Android Studio目前不支持自动为复合构建中的子构建自动创建local.properties文件。" +
"注意:新增环境变量后,一般不会立即生效,最简单的办法是重启电脑。")
}

//buildscript不能从其他gradle文件中apply,所以这段buildscript脚本存在于多个子构建中。
//请更新buildscript时同步更新。
buildscript {
Expand Down
1 change: 0 additions & 1 deletion projects/sample/sample-host/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
android:theme="@android:style/Theme.DeviceDefault"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name="com.tencent.shadow.sample.host.MainActivity"
android:process=":plugin"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ object CreateResourceBloc {
fun create(packageArchiveInfo: PackageInfo, archiveFilePath: String, hostAppContext: Context): Resources {
val packageManager = hostAppContext.packageManager
packageArchiveInfo.applicationInfo.publicSourceDir = archiveFilePath
packageArchiveInfo.applicationInfo.sourceDir = archiveFilePath
try {
return packageManager.getResourcesForApplication(packageArchiveInfo.applicationInfo)
} catch (e: PackageManager.NameNotFoundException) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ private Resources createResources(String apkPath, Context base) {
PackageManager packageManager = base.getPackageManager();
PackageInfo packageArchiveInfo = packageManager.getPackageArchiveInfo(apkPath, GET_META_DATA);
packageArchiveInfo.applicationInfo.publicSourceDir = apkPath;
packageArchiveInfo.applicationInfo.sourceDir = apkPath;
try {
return packageManager.getResourcesForApplication(packageArchiveInfo.applicationInfo);
} catch (PackageManager.NameNotFoundException e) {
Expand Down
6 changes: 6 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
rootProject.name = 'shadow'

if (!System.getenv().containsKey("ANDROID_HOME")) {
throw new RuntimeException("未定义ANDROID_HOME环境变量。" +
"原因:Android Studio目前不支持自动为复合构建中的子构建自动创建local.properties文件。" +
"注意:新增环境变量后,一般不会立即生效,最简单的办法是重启电脑。")
}

includeBuild 'projects/sdk/coding'
includeBuild 'projects/sdk/core'
includeBuild 'projects/sdk/dynamic'
Expand Down