├── stark-core ├── .gitignore ├── src │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── res │ │ │ └── values │ │ │ │ └── strings.xml │ │ └── java │ │ │ └── com │ │ │ └── ximsfei │ │ │ └── stark │ │ │ └── core │ │ │ └── runtime │ │ │ ├── PatchLoader.java │ │ │ ├── StarkChange.java │ │ │ ├── StarkConfig.java │ │ │ └── app │ │ │ ├── StarkService.java │ │ │ ├── StarkActivity.java │ │ │ └── StarkListActivity.java │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── ximsfei │ │ │ └── stark │ │ │ └── core │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── ximsfei │ │ └── stark │ │ └── core │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── stark-gradle ├── .gitignore ├── src │ └── main │ │ ├── resources │ │ └── META-INF │ │ │ └── gradle-plugins │ │ │ └── com.ximsfei.stark.properties │ │ └── groovy │ │ └── com │ │ └── ximsfei │ │ └── stark │ │ └── gradle │ │ ├── aapt │ │ ├── ResTableType.groovy │ │ ├── ResStringFlag.groovy │ │ ├── ResValueDataType.groovy │ │ ├── ResTableEntry.groovy │ │ ├── ResStringPoolSpan.groovy │ │ ├── ResType.groovy │ │ ├── ResAttr.groovy │ │ ├── CppHexEditor.groovy │ │ ├── SymbolParser.groovy │ │ └── AXmlEditor.groovy │ │ ├── StarkExtension.groovy │ │ ├── util │ │ └── Plog.groovy │ │ ├── scope │ │ └── GlobalScope.groovy │ │ └── exception │ │ └── StarkException.groovy ├── proguard-rules.pro └── build.gradle ├── stark-sample ├── .gitignore ├── stark.properties ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── styles.xml │ │ │ │ └── colors.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── layout │ │ │ │ ├── activity_second.xml │ │ │ │ └── activity_main.xml │ │ │ ├── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ │ └── drawable │ │ │ │ └── ic_launcher_background.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── ximsfei │ │ │ │ └── stark │ │ │ │ └── app │ │ │ │ └── StarkApp.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── ximsfei │ │ │ └── stark │ │ │ └── app │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── ximsfei │ │ └── stark │ │ └── app │ │ └── ExampleInstrumentedTest.java ├── stark-rules.pro ├── proguard-rules.pro └── build.gradle ├── logo.png ├── settings.gradle ├── patch.sh ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── uploadJCenter.sh ├── .gitignore ├── publish.sh ├── PULL_REQUEST_TEMPLATE.md ├── .github └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── gradle.properties ├── CONTRIBUTING.md ├── gradlew.bat ├── publishing_maven.gradle ├── README.md ├── gradlew └── LICENSE /stark-core/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /stark-gradle/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /stark-sample/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /stark 3 | -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ximsfei/Stark/HEAD/logo.png -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':stark-sample', ':stark-gradle', ':stark-core' 2 | -------------------------------------------------------------------------------- /stark-core/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ./gradlew :stark-sample:clean :stark-sample:starkGeneratePatchDebug -q --stacktrace 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ximsfei/Stark/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /stark-core/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | stark-core 3 | 4 | -------------------------------------------------------------------------------- /stark-sample/stark.properties: -------------------------------------------------------------------------------- 1 | autoBackup=true 2 | allStark=true 3 | releaseStark=true 4 | multiDexEnabled=false 5 | starkFile= 6 | -------------------------------------------------------------------------------- /uploadJCenter.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ./gradlew clean stark-core:assembleRelease stark-core:bintrayUpload stark-gradle:bintrayUpload 4 | -------------------------------------------------------------------------------- /stark-gradle/src/main/resources/META-INF/gradle-plugins/com.ximsfei.stark.properties: -------------------------------------------------------------------------------- 1 | implementation-class=com.ximsfei.stark.gradle.StarkPlugin -------------------------------------------------------------------------------- /stark-sample/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ximsfei/Stark/HEAD/stark-sample/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /stark-sample/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ximsfei/Stark/HEAD/stark-sample/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /stark-sample/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ximsfei/Stark/HEAD/stark-sample/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /stark-sample/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ximsfei/Stark/HEAD/stark-sample/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /stark-sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ximsfei/Stark/HEAD/stark-sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /stark-sample/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ximsfei/Stark/HEAD/stark-sample/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /stark-sample/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ximsfei/Stark/HEAD/stark-sample/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /stark-sample/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ximsfei/Stark/HEAD/stark-sample/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /stark-sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ximsfei/Stark/HEAD/stark-sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /stark-sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ximsfei/Stark/HEAD/stark-sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/libraries 5 | /.idea/modules.xml 6 | /.idea/workspace.xml 7 | /.idea 8 | .DS_Store 9 | /build 10 | /captures 11 | .externalNativeBuild 12 | /repo -------------------------------------------------------------------------------- /publish.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ./gradlew clean :stark-core:assembleRelease :stark-core:uploadArchives :stark-gradle:uploadArchives 3 | ./gradlew :stark-sample:assembleDebug -q --stacktrace 4 | #./gradlew :app:starkBackupDebug 5 | -------------------------------------------------------------------------------- /stark-sample/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Stark 3 | Resources bug 4 | 5 | 6 | -------------------------------------------------------------------------------- /stark-sample/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /stark-sample/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon May 07 08:03:16 CST 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip 7 | -------------------------------------------------------------------------------- /stark-sample/stark-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific stark rules here. 2 | # include packages that need to be fixed in the future. 3 | # exclude packages that never to be fixed in the future. 4 | 5 | -include: com.ximsfei.stark.core. 6 | -include: com.ximsfei.stark.app. 7 | 8 | -exclude: android.support. 9 | -------------------------------------------------------------------------------- /stark-sample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /stark-sample/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Description 2 | 3 | 4 | 5 | ## Motivation and Context 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /stark-core/src/test/java/com/ximsfei/stark/core/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.ximsfei.stark.core; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /stark-sample/src/test/java/com/ximsfei/stark/app/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.ximsfei.stark.app; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /stark-sample/src/main/java/com/ximsfei/stark/app/StarkApp.java: -------------------------------------------------------------------------------- 1 | package com.ximsfei.stark.app; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | 6 | import com.ximsfei.stark.core.Stark; 7 | 8 | public class StarkApp extends Application { 9 | @Override 10 | protected void attachBaseContext(Context base) { 11 | super.attachBaseContext(base); 12 | Stark.get().load(base); 13 | } 14 | 15 | @Override 16 | public void onCreate() { 17 | super.onCreate(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | **Is your feature request related to a problem? Please describe.** 8 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 9 | 10 | **Describe the solution you'd like** 11 | A clear and concise description of what you want to happen. 12 | 13 | **Describe alternatives you've considered** 14 | A clear and concise description of any alternative solutions or features you've considered. 15 | 16 | **Additional context** 17 | Add any other context or screenshots about the feature request here. 18 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | org.gradle.daemon=false 15 | -------------------------------------------------------------------------------- /stark-sample/src/main/res/layout/activity_second.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 14 | 15 | 20 | 21 | -------------------------------------------------------------------------------- /stark-core/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /stark-gradle/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | Contributions of all types are welcome. 3 | We use GitHub as our bug and feature tracker both for code and for other aspects of the library (documentation, the wiki, etc.). 4 | 5 | 6 | ## Filing issues 7 | When in doubt, file an issue. We'd rather close a few duplicate issues than let a problem go unnoticed. 8 | Similarly if you support a particular feature request, feel free to let us know by commenting on the issue to the issue. 9 | 10 | To file a new issue, please use our issue template and fill out the template as much as possible (remove irrelevant parts). 11 | The more information you can provide, the more likely we are to be able help. 12 | 13 | 14 | ## Contributing code 15 | Pull requests are welcome for all parts of the codebase, especially the integration libraries. 16 | If you'd like to contribute code, you will need to sign apache 2.0 license agreement. 17 | -------------------------------------------------------------------------------- /stark-sample/src/androidTest/java/com/ximsfei/stark/app/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.ximsfei.stark.app; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.ximsfei.stark.app", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /stark-core/src/androidTest/java/com/ximsfei/stark/core/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.ximsfei.stark.core; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.ximsfei.stark.core.test", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /stark-sample/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /stark-gradle/src/main/groovy/com/ximsfei/stark/gradle/aapt/ResTableType.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-present wequick.net 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | * not use this file except in compliance with the License. You may obtain 6 | * a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | package com.ximsfei.stark.gradle.aapt 17 | 18 | /** 19 | * enum from include/androidfw/ResourceTypes.h 20 | */ 21 | public enum ResTableType { 22 | public static int NO_ENTRY = -1; 23 | } 24 | -------------------------------------------------------------------------------- /stark-gradle/src/main/groovy/com/ximsfei/stark/gradle/aapt/ResStringFlag.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-present wequick.net 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | * not use this file except in compliance with the License. You may obtain 6 | * a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | package com.ximsfei.stark.gradle.aapt 17 | 18 | /** 19 | * enum from include/androidfw/ResourceTypes.h 20 | */ 21 | public enum ResStringFlag { 22 | public static int SORTED_FLAG = 1<<0; 23 | public static int UTF8_FLAG = 1<<8; 24 | } 25 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | **Describe the bug** 8 | A clear and concise description of what the bug is. 9 | 10 | **To Reproduce** 11 | Steps to reproduce the behavior: 12 | 1. Fixed the code '...' 13 | 2. See error 14 | 15 | **Expected behavior** 16 | A clear and concise description of what you expected to happen. 17 | 18 | **Screenshots** 19 | If applicable, add screenshots to help explain your problem. 20 | 21 | **Device (please complete the following information):** 22 | - Manufacturer: [e.g. samsung] 23 | - Model: [e.g. SM-G9350] 24 | - OS: [e.g. Android 7.0] 25 | 26 | **APK** 27 | - BUILD_HASH: [e.g. 9d34cb4e-0684-4ac1-986f-63c5c93b4043] 28 | - versionCode: [e.g. 1] 29 | 30 | **Patch** 31 | - BUILD_HASH: [e.g. 9d34cb4e-0684-4ac1-986f-63c5c93b4043] 32 | - BUILD_TIME: [e.g. 1527124514751] 33 | 34 | **Additional context** 35 | Add any other context about the problem here. 36 | -------------------------------------------------------------------------------- /stark-gradle/src/main/groovy/com/ximsfei/stark/gradle/aapt/ResValueDataType.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-present wequick.net 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | * not use this file except in compliance with the License. You may obtain 6 | * a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | package com.ximsfei.stark.gradle.aapt 17 | 18 | /** 19 | * enum from include/androidfw/ResourceTypes.h 20 | */ 21 | public enum ResValueDataType { 22 | public static int TYPE_REFERENCE = 0x01; 23 | public static int TYPE_STRING = 0x03; 24 | } 25 | -------------------------------------------------------------------------------- /stark-gradle/src/main/groovy/com/ximsfei/stark/gradle/aapt/ResTableEntry.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-present wequick.net 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | * not use this file except in compliance with the License. You may obtain 6 | * a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | package com.ximsfei.stark.gradle.aapt 17 | 18 | /** 19 | * enum from include/androidfw/ResourceTypes.h 20 | */ 21 | public enum ResTableEntry { 22 | public static int FLAG_COMPLEX = 0X0001; 23 | public static int FLAG_PUBLIC = 0X0002; 24 | public static int FLAG_WEAK = 0X0004; 25 | } 26 | -------------------------------------------------------------------------------- /stark-gradle/src/main/groovy/com/ximsfei/stark/gradle/aapt/ResStringPoolSpan.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-present wequick.net 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | * not use this file except in compliance with the License. You may obtain 6 | * a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | package com.ximsfei.stark.gradle.aapt 17 | 18 | /** 19 | * enum from include/androidfw/ResourceTypes.h 20 | */ 21 | public enum ResStringPoolSpan { 22 | public static int END = 0xFFFFFFFF; 23 | public static byte[] END_SPAN = [0xFF, 0xFF, 0xFF, 0xFF, 24 | 0xFF, 0xFF, 0xFF, 0xFF] 25 | } -------------------------------------------------------------------------------- /stark-gradle/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'groovy' 2 | apply plugin: 'java' 3 | 4 | repositories { 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | implementation fileTree(dir: 'libs', include: ['*.jar']) 10 | compileOnly gradleApi() 11 | compileOnly 'com.android.tools.build:gradle:3.1.2' 12 | compile 'io.sigpipe:jbsdiff:' + rootProject.jbsdiffVersion 13 | // implementation 'org.ow2.asm:asm:6.1.1' 14 | // implementation 'org.ow2.asm:asm-analysis:6.1.1' 15 | // implementation 'org.ow2.asm:asm-commons:6.1.1' 16 | // implementation 'org.ow2.asm:asm-tree:6.1.1' 17 | // implementation 'org.ow2.asm:asm-util:6.1.1' 18 | } 19 | 20 | ext { 21 | publishVersion = rootProject.starkVersion 22 | moduleName = 'stark-gradle' 23 | descContent = 'Stark Gradle Plugin' 24 | } 25 | 26 | apply from: '../publishing_maven.gradle' 27 | 28 | uploadArchives { 29 | repositories { 30 | mavenDeployer { 31 | repository(url: "file://" + rootProject.projectDir.absolutePath + "/repo") 32 | pom.project { 33 | groupId "com.ximsfei" 34 | artifactId "stark-gradle" 35 | version rootProject.starkVersion 36 | } 37 | 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /stark-core/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion rootProject.compileSdkVersion 5 | 6 | defaultConfig { 7 | minSdkVersion rootProject.minSdkVersion 8 | targetSdkVersion rootProject.targetSdkVersion 9 | versionCode 1 10 | versionName "1.0" 11 | } 12 | 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | 20 | } 21 | 22 | dependencies { 23 | implementation fileTree(dir: 'libs', include: ['*.jar']) 24 | implementation 'io.sigpipe:jbsdiff:' + rootProject.jbsdiffVersion 25 | } 26 | 27 | ext { 28 | publishVersion = rootProject.starkVersion 29 | moduleName = 'stark-core' 30 | descContent = 'Stark 运行时核心库' 31 | } 32 | 33 | apply from: '../publishing_maven.gradle' 34 | 35 | uploadArchives { 36 | repositories { 37 | mavenDeployer { 38 | repository(url: "file://" + rootProject.projectDir.absolutePath + "/repo") 39 | pom.project { 40 | groupId "com.ximsfei" 41 | artifactId "stark-core" 42 | version rootProject.starkVersion 43 | } 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /stark-sample/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -optimizationpasses 5 23 | -dontusemixedcaseclassnames 24 | -dontskipnonpubliclibraryclasses 25 | -dontpreverify 26 | -verbose 27 | -ignorewarnings 28 | -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* 29 | 30 | -keep public class * extends android.app.Activity 31 | -keep public class * extends android.app.Application 32 | -keep public class * extends android.app.Service 33 | 34 | -keep class com.ximsfei.stark.core.runtime.** {public *;} 35 | -------------------------------------------------------------------------------- /stark-sample/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 |