diff --git a/app/build.gradle b/app/build.gradle index cec66d7..2de9e57 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,12 +1,11 @@ apply plugin: 'com.dd.comgradle' android { - compileSdkVersion 25 - buildToolsVersion "25.0.2" + compileSdkVersion 26 defaultConfig { applicationId "com.mrzhang.androidcomponent" minSdkVersion 15 - targetSdkVersion 14 + targetSdkVersion 26 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" @@ -25,7 +24,7 @@ android { } dependencies { - compile project(':componentservice') + implementation project(':componentservice') } combuild { diff --git a/basiclib/build.gradle b/basiclib/build.gradle index d92c552..db20077 100644 --- a/basiclib/build.gradle +++ b/basiclib/build.gradle @@ -2,7 +2,6 @@ apply plugin: 'com.android.library' android { compileSdkVersion 26 - buildToolsVersion "26.0.1" defaultConfig { minSdkVersion 15 @@ -22,12 +21,12 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { + api fileTree(dir: 'libs', include: ['*.jar']) + androidTestApi('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) - compile 'com.android.support:appcompat-v7:26.+' - testCompile 'junit:junit:4.12' - compile 'com.squareup.okhttp3:okhttp:3.4.1' - compile 'com.squareup.picasso:picasso:2.5.2' + api 'com.android.support:appcompat-v7:26.1.0' + testApi 'junit:junit:4.12' + api 'com.squareup.okhttp3:okhttp:3.4.1' + api 'com.squareup.picasso:picasso:2.5.2' } diff --git a/basicres/build.gradle b/basicres/build.gradle index 4f4949d..5dd5f27 100644 --- a/basicres/build.gradle +++ b/basicres/build.gradle @@ -2,7 +2,6 @@ apply plugin: 'com.android.library' android { compileSdkVersion 26 - buildToolsVersion "26.0.1" defaultConfig { minSdkVersion 15 @@ -24,5 +23,5 @@ android { } dependencies { - compile project(':basiclib') + api project(':basiclib') } diff --git a/build-gradle/build.gradle b/build-gradle/build.gradle index 26a1503..f4af7fe 100644 --- a/build-gradle/build.gradle +++ b/build-gradle/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'groovy' apply plugin: 'maven' dependencies { - compile 'com.android.tools.build:gradle:2.3.2' + compile 'com.android.tools.build:gradle:3.0.1' compile group: 'org.javassist', name: 'javassist', version: '3.20.0-GA' //gradle sdk compile gradleApi() @@ -15,7 +15,7 @@ repositories { } group = 'com.mrzhang.andcomponent' -version = '0.0.2' +version = '0.0.5' uploadArchives { repositories { diff --git a/build-gradle/src/main/groovy/com.dd.buildgradle/ComBuild.groovy b/build-gradle/src/main/groovy/com.dd.buildgradle/ComBuild.groovy index 6ab7bce..efd1608 100644 --- a/build-gradle/src/main/groovy/com.dd.buildgradle/ComBuild.groovy +++ b/build-gradle/src/main/groovy/com.dd.buildgradle/ComBuild.groovy @@ -5,48 +5,49 @@ import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.api.Task -public class ComBuild implements Plugin { +class ComBuild implements Plugin { + private def MAINMODULE = "mainmodulename" + private def DEDAULT = "app" + private def ALLMODULE = "all" + private def TAG = "ComBuild --->" //默认是app,直接运行assembleRelease的时候,等同于运行app:assembleRelease - String compilemodule = "app" + private def compileModule = DEDAULT void apply(Project project) { project.extensions.create('combuild', ComExtension) String taskNames = project.gradle.startParameter.taskNames.toString() - System.out.println("taskNames is " + taskNames); + //类似这种格式[clean, :basiclib:generateDebugSources] + System.out.println("$TAG taskNames is " + taskNames) String module = project.path.replace(":", "") - System.out.println("current module is " + module); + System.out.println("$TAG current module is " + module) AssembleTask assembleTask = getTaskInfo(project.gradle.startParameter.taskNames) if (assembleTask.isAssemble) { - fetchMainmodulename(project, assembleTask); - System.out.println("compilemodule is " + compilemodule); + fetchCompileModuleName(project, assembleTask) + System.out.println("$TAG compile module is " + compileModule) } if (!project.hasProperty("isRunAlone")) { - throw new RuntimeException("you should set isRunAlone in " + module + "'s gradle.properties") + throw new RuntimeException("$TAG you should set isRunAlone in " + module + "'s gradle.properties") } //对于isRunAlone==true的情况需要根据实际情况修改其值, // 但如果是false,则不用修改,该module作为一个lib,运行module:assembleRelease则发布aar到中央仓库 boolean isRunAlone = Boolean.parseBoolean((project.properties.get("isRunAlone"))) - String mainmodulename = project.rootProject.property("mainmodulename") + String mainModuleName = project.rootProject.property(MAINMODULE) if (isRunAlone && assembleTask.isAssemble) { //对于要编译的组件和主项目,isRunAlone修改为true,其他组件都强制修改为false //这就意味着组件不能引用主项目,这在层级结构里面也是这么规定的 - if (module.equals(compilemodule) || module.equals(mainmodulename)) { - isRunAlone = true; - } else { - isRunAlone = false; - } + isRunAlone = module == compileModule || module == mainModuleName } project.setProperty("isRunAlone", isRunAlone) //根据配置添加各种组件依赖,并且自动化生成组件加载代码 if (isRunAlone) { project.apply plugin: 'com.android.application' - if (!module.equals(mainmodulename)) { + if (module != mainModuleName) { project.android.sourceSets { main { manifest.srcFile 'src/main/runalone/AndroidManifest.xml' @@ -55,21 +56,21 @@ public class ComBuild implements Plugin { } } } - System.out.println("apply plugin is " + 'com.android.application'); - if (assembleTask.isAssemble && module.equals(compilemodule)) { + System.out.println("$TAG apply plugin is " + 'com.android.application') + if (assembleTask.isAssemble && module == compileModule) { compileComponents(assembleTask, project) project.android.registerTransform(new ComCodeTransform(project)) } } else { project.apply plugin: 'com.android.library' - System.out.println("apply plugin is " + 'com.android.library'); + System.out.println("$TAG apply plugin is " + 'com.android.library') project.afterEvaluate { Task assembleReleaseTask = project.tasks.findByPath("assembleRelease") if (assembleReleaseTask != null) { assembleReleaseTask.doLast { File infile = project.file("build/outputs/aar/$module-release.aar") File outfile = project.file("../componentrelease") - File desFile = project.file("$module-release.aar"); + File desFile = project.file("$module-release.aar") project.copy { from infile into outfile @@ -77,12 +78,11 @@ public class ComBuild implements Plugin { String fileName -> desFile.name } } - System.out.println("$module-release.aar copy success "); + System.out.println("$TAG $module-release.aar copy success ") } } } } - } /** @@ -90,37 +90,40 @@ public class ComBuild implements Plugin { * assembleRelease ---app * app:assembleRelease :app:assembleRelease ---app * sharecomponent:assembleRelease :sharecomponent:assembleRelease ---sharecomponent - * @param assembleTask + * + * @param project 构建项目 + * @param assembleTask 构建任务 */ - private void fetchMainmodulename(Project project, AssembleTask assembleTask) { - if (!project.rootProject.hasProperty("mainmodulename")) { - throw new RuntimeException("you should set compilemodule in rootproject's gradle.properties") + private void fetchCompileModuleName(Project project, AssembleTask assembleTask) { + if (!project.rootProject.hasProperty(MAINMODULE)) { + throw new RuntimeException("$TAG you should set compileModule in rootproject's gradle.properties") } if (assembleTask.modules.size() > 0 && assembleTask.modules.get(0) != null && assembleTask.modules.get(0).trim().length() > 0 - && !assembleTask.modules.get(0).equals("all")) { - compilemodule = assembleTask.modules.get(0); + && assembleTask.modules.get(0) != ALLMODULE) { + compileModule = assembleTask.modules.get(0) } else { - compilemodule = project.rootProject.property("mainmodulename") + compileModule = project.rootProject.property(MAINMODULE) } - if (compilemodule == null || compilemodule.trim().length() <= 0) { - compilemodule = "app" + if (compileModule == null || compileModule.trim().length() <= 0) { + compileModule = DEDAULT } } private AssembleTask getTaskInfo(List taskNames) { - AssembleTask assembleTask = new AssembleTask(); + AssembleTask assembleTask = new AssembleTask() for (String task : taskNames) { if (task.toUpperCase().contains("ASSEMBLE") || task.contains("aR") || task.toUpperCase().contains("RESGUARD")) { if (task.toUpperCase().contains("DEBUG")) { - assembleTask.isDebug = true; + assembleTask.isDebug = true } - assembleTask.isAssemble = true; - String[] strs = task.split(":") - assembleTask.modules.add(strs.length > 1 ? strs[strs.length - 2] : "all"); - break; + assembleTask.isAssemble = true + //task类似这种格式[:app:assembleDebug],所以需要提取第一个冒号后面的名称 + String[] split = task.split(":") + assembleTask.modules.add(split.length > 1 ? split[split.length - 2] : ALLMODULE) + break } } return assembleTask @@ -128,12 +131,12 @@ public class ComBuild implements Plugin { /** * 自动添加依赖,只在运行assemble任务的才会添加依赖,因此在开发期间组件之间是完全感知不到的,这是做到完全隔离的关键 - * 支持两种语法:module或者modulePackage:module,前者之间引用module工程,后者使用componentrelease中已经发布的aar - * @param assembleTask - * @param project + * 支持两种语法:module或者modulePackage:module,前者直接引用module工程,后者使用'componentrelease'中已经发布的aar + * @param assembleTask 构建任务 + * @param project 构建项目 */ private void compileComponents(AssembleTask assembleTask, Project project) { - String components; + String components if (assembleTask.isDebug) { components = (String) project.properties.get("debugComponent") } else { @@ -141,35 +144,39 @@ public class ComBuild implements Plugin { } if (components == null || components.length() == 0) { - System.out.println("there is no add dependencies "); - return; + System.out.println("$TAG there is no add dependencies ") + return } String[] compileComponents = components.split(",") if (compileComponents == null || compileComponents.length == 0) { - System.out.println("there is no add dependencies "); - return; + System.out.println("$TAG there is no add dependencies ") + return } - for (String str : compileComponents) { - System.out.println("comp is " + str); - if (str.contains(":")) { - File file = project.file("../componentrelease/" + str.split(":")[1] + "-release.aar") + for (String component : compileComponents) { + System.out.println("$TAG adding compile component [$component]") + //modulePackage:module语法格式,添加依赖aar + if (component.contains(":")) { + def aarPath = "../componentrelease/${component.split(":")[1]}-release.aar" + File file = project.file(aarPath) if (file.exists()) { - project.dependencies.add("compile", str + "-release@aar") - System.out.println("add dependencies : " + str + "-release@aar"); + project.dependencies.add("implementation", "$component-release@aar") + System.out.println("$TAG add dependencies : [$component-release@aar]") } else { - throw new RuntimeException(str + " not found ! maybe you should generate a new one ") + throw new RuntimeException("$TAG $aarPath not found ! maybe you should generate a new one ") } } else { - project.dependencies.add("compile", project.project(':' + str)) - System.out.println("add dependencies project : " + str); + //module语法格式,添加project依赖 + project.dependencies.add("implementation", project.project(":$component")) + System.out.println("$TAG add dependencies project : [$component]") } } } - + /** + * 构建任务信息类 + */ private class AssembleTask { - boolean isAssemble = false; - boolean isDebug = false; - List modules = new ArrayList<>(); + boolean isAssemble = false + boolean isDebug = false + List modules = new ArrayList<>() } - } \ No newline at end of file diff --git a/build-gradle/src/main/groovy/com.dd.buildgradle/ComCodeTransform.groovy b/build-gradle/src/main/groovy/com.dd.buildgradle/ComCodeTransform.groovy index 81b891e..2808ee2 100644 --- a/build-gradle/src/main/groovy/com.dd.buildgradle/ComCodeTransform.groovy +++ b/build-gradle/src/main/groovy/com.dd.buildgradle/ComCodeTransform.groovy @@ -7,11 +7,13 @@ import org.apache.commons.codec.digest.DigestUtils import org.apache.commons.io.FileUtils import org.gradle.api.Project -public class ComCodeTransform extends Transform { +class ComCodeTransform extends Transform { private Project project - ClassPool classPool - String applicationName; + private ClassPool classPool + private String applicationName; + private def TAG = "ComBuild Transform --->" + def RegisterComponentSuper = "com.mrzhang.component.componentlib.applicationlike.IApplicationLike" ComCodeTransform(Project project) { this.project = project @@ -19,32 +21,32 @@ public class ComCodeTransform extends Transform { @Override void transform(TransformInvocation transformInvocation) throws TransformException, InterruptedException, IOException { - getRealApplicationName(transformInvocation.getInputs()); + getRealApplicationName(transformInvocation.getInputs()) classPool = new ClassPool() project.android.bootClasspath.each { classPool.appendClassPath((String) it.absolutePath) } - def box = ConvertUtils.toCtClasses(transformInvocation.getInputs(), classPool) + def box = ConvertUtils.toCtClasses(transformInvocation.inputs, classPool) //要收集的application,一般情况下只有一个 - List applications = new ArrayList<>(); + List applications = new ArrayList<>() //要收集的applicationlikes,一般情况下有几个组件就有几个applicationlike - List activators = new ArrayList<>(); + List activators = new ArrayList<>() for (CtClass ctClass : box) { if (isApplication(ctClass)) { applications.add(ctClass) - continue; + continue } if (isActivator(ctClass)) { activators.add(ctClass) } } for (CtClass ctClass : applications) { - System.out.println("application is " + ctClass.getName()); + System.out.println("$TAG application is " + ctClass.getName()) } for (CtClass ctClass : activators) { - System.out.println("applicationlike is " + ctClass.getName()); + System.out.println("$TAG applicationlike is " + ctClass.getName()) } transformInvocation.inputs.each { TransformInput input -> @@ -75,8 +77,10 @@ public class ComCodeTransform extends Transform { String classNameTemp = filePath.replace(fileName, "").replace("\\", ".").replace("/", ".") if (classNameTemp.endsWith(".class")) { String className = classNameTemp.substring(1, classNameTemp.length() - 6) - if (className.equals(applicationName)) { - injectApplicationCode(applications.get(0), activators, fileName); + if (className == applicationName) { + System.out.println("$TAG [$className] injectApplicationCode begin") + injectApplicationCode(applications.get(0), activators, fileName) + System.out.println("$TAG [$className] injectApplicationCode success ") } } } @@ -100,61 +104,55 @@ public class ComCodeTransform extends Transform { private void injectApplicationCode(CtClass ctClassApplication, List activators, String patch) { - System.out.println("injectApplicationCode begin"); - ctClassApplication.defrost(); + ctClassApplication.defrost() + def insertCode = getAutoLoadComCode(activators) + System.out.println("$TAG >>>>>>>>>> $insertCode ") try { CtMethod attachBaseContextMethod = ctClassApplication.getDeclaredMethod("onCreate", null) - attachBaseContextMethod.insertAfter(getAutoLoadComCode(activators)) - } catch (CannotCompileException | NotFoundException e) { - StringBuilder methodBody = new StringBuilder(); - methodBody.append("protected void onCreate() {"); - methodBody.append("super.onCreate();"); - methodBody. - append(getAutoLoadComCode(activators)); - methodBody.append("}"); - ctClassApplication.addMethod(CtMethod.make(methodBody.toString(), ctClassApplication)); - } catch (Exception e) { - + attachBaseContextMethod.insertAfter(insertCode) + } catch (CannotCompileException | NotFoundException ignored) { + StringBuilder methodBody = new StringBuilder() + methodBody.append("protected void onCreate() {") + methodBody.append("super.onCreate();") + methodBody.append(insertCode) + methodBody.append("}") + ctClassApplication.addMethod(CtMethod.make(methodBody.toString(), ctClassApplication)) + } catch (Exception ignored) { } ctClassApplication.writeFile(patch) ctClassApplication.detach() - - System.out.println("injectApplicationCode success "); } private String getAutoLoadComCode(List activators) { - StringBuilder autoLoadComCode = new StringBuilder(); + StringBuilder autoLoadComCode = new StringBuilder() for (CtClass ctClass : activators) { autoLoadComCode.append("new " + ctClass.getName() + "()" + ".onCreate();") } - return autoLoadComCode.toString() } - private boolean isApplication(CtClass ctClass) { try { - if (applicationName != null && applicationName.equals(ctClass.getName())) { - return true; + if (applicationName != null && applicationName == ctClass.getName()) { + return true } - } catch (Exception e) { - println "class not found exception class name: " + ctClass.getName() + } catch (Exception ignored) { + println "$TAG class not found exception class name: " + ctClass.getName() } - return false; + return false } private boolean isActivator(CtClass ctClass) { try { for (CtClass ctClassInter : ctClass.getInterfaces()) { - if ("com.mrzhang.component.componentlib.applicationlike.IApplicationLike".equals(ctClassInter.name)) { - return true; + if (RegisterComponentSuper == ctClassInter.name) { + return true } } - } catch (Exception e) { - println "class not found exception class name: " + ctClass.getName() + } catch (Exception ignored) { + println "$TAG class not found exception class name: " + ctClass.getName() } - - return false; + return false } @Override diff --git a/build-gradle/src/main/groovy/com.dd.buildgradle/ConvertUtils.groovy b/build-gradle/src/main/groovy/com.dd.buildgradle/ConvertUtils.groovy index 038db6b..ecc80d3 100644 --- a/build-gradle/src/main/groovy/com.dd.buildgradle/ConvertUtils.groovy +++ b/build-gradle/src/main/groovy/com.dd.buildgradle/ConvertUtils.groovy @@ -4,6 +4,8 @@ import com.android.SdkConstants import com.android.build.api.transform.TransformInput import javassist.ClassPool import javassist.CtClass +import javassist.NotFoundException +import org.apache.commons.io.FileUtils import java.util.jar.JarEntry import java.util.jar.JarFile @@ -12,12 +14,12 @@ import java.util.regex.Matcher class ConvertUtils { static List toCtClasses(Collection inputs, ClassPool classPool) { List classNames = new ArrayList<>() - List allClass = new ArrayList<>(); + List allClass = new ArrayList<>() inputs.each { it.directoryInputs.each { def dirPath = it.file.absolutePath classPool.insertClassPath(it.file.absolutePath) - org.apache.commons.io.FileUtils.listFiles(it.file, null, true).each { + FileUtils.listFiles(it.file, null, true).each { if (it.absolutePath.endsWith(SdkConstants.DOT_CLASS)) { def className = it.absolutePath.substring(dirPath.length() + 1, it.absolutePath.length() - SdkConstants.DOT_CLASS.length()).replaceAll(Matcher.quoteReplacement(File.separator), '.') if (classNames.contains(className)) { @@ -31,10 +33,10 @@ class ConvertUtils { it.jarInputs.each { classPool.insertClassPath(it.file.absolutePath) def jarFile = new JarFile(it.file) - Enumeration classes = jarFile.entries(); + Enumeration classes = jarFile.entries() while (classes.hasMoreElements()) { - JarEntry libClass = classes.nextElement(); - String className = libClass.getName(); + JarEntry libClass = classes.nextElement() + String className = libClass.getName() if (className.endsWith(SdkConstants.DOT_CLASS)) { className = className.substring(0, className.length() - SdkConstants.DOT_CLASS.length()).replaceAll('/', '.') if (classNames.contains(className)) { @@ -47,13 +49,11 @@ class ConvertUtils { } classNames.each { try { - allClass.add(classPool.get(it)); - } catch (javassist.NotFoundException e) { + allClass.add(classPool.get(it)) + } catch (NotFoundException ignored) { println "class not found exception class name: $it " } } - return allClass; + return allClass } - - } \ No newline at end of file diff --git a/build.gradle b/build.gradle index 69202a9..1e9fef0 100644 --- a/build.gradle +++ b/build.gradle @@ -7,10 +7,11 @@ buildscript { maven { url uri('./repo') } + google() } dependencies { - classpath 'com.android.tools.build:gradle:2.3.3' - classpath 'com.mrzhang.andcomponent:build-gradle:0.0.2' + classpath 'com.android.tools.build:gradle:3.0.1' + classpath 'com.mrzhang.andcomponent:build-gradle:0.0.5' } } @@ -24,5 +25,6 @@ allprojects { maven { url uri('./repo') } + google() } } \ No newline at end of file diff --git a/componentlib/build.gradle b/componentlib/build.gradle index 9f41ee4..71fe216 100644 --- a/componentlib/build.gradle +++ b/componentlib/build.gradle @@ -5,7 +5,6 @@ targetCompatibility = "1.7" android { compileSdkVersion 26 - buildToolsVersion "26.0.0" defaultConfig { minSdkVersion 14 @@ -25,8 +24,8 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:26.+' + api fileTree(dir: 'libs', include: ['*.jar']) + api 'com.android.support:appcompat-v7:26.1.0' } diff --git a/componentservice/build.gradle b/componentservice/build.gradle index d6a5170..837b10d 100644 --- a/componentservice/build.gradle +++ b/componentservice/build.gradle @@ -2,7 +2,6 @@ apply plugin: 'com.android.library' android { compileSdkVersion 26 - buildToolsVersion "26.0.0" defaultConfig { minSdkVersion 15 @@ -22,7 +21,7 @@ android { } dependencies { - compile project(':componentlib') - compile project(':basicres') - compile fileTree(dir: 'libs', include: ['*.jar']) + api project(':componentlib') + api project(':basicres') + api fileTree(dir: 'libs', include: ['*.jar']) } diff --git a/gradle.properties b/gradle.properties index 8c5c255..d0dfe6e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,18 +1,19 @@ -# Project-wide Gradle settings. - -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. - +## Project-wide Gradle settings. +# # For more details on how to configure your build environment visit # http://www.gradle.org/docs/current/userguide/build_environment.html - +# # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx1536m - +# Default value: -Xmx1024m -XX:MaxPermSize=256m +# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +# # When configured, Gradle will run in incubating parallel mode. # 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 # org.gradle.parallel=true +#Mon Dec 04 18:01:04 CST 2017 +systemProp.http.proxyHost=127.0.0.1 +org.gradle.jvmargs=-Xmx1536m mainmodulename=app +systemProp.http.proxyPort=1080 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index eb3a5f7..43b6840 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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-3.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip diff --git a/readercomponent/build.gradle b/readercomponent/build.gradle index a1f01fc..dde9745 100644 --- a/readercomponent/build.gradle +++ b/readercomponent/build.gradle @@ -1,11 +1,10 @@ apply plugin: 'com.dd.comgradle' android { - compileSdkVersion 25 - buildToolsVersion "25.0.2" + compileSdkVersion 26 defaultConfig { minSdkVersion 15 - targetSdkVersion 14 + targetSdkVersion 26 versionCode 1 versionName "1.0" @@ -22,7 +21,6 @@ android { debug { minifyEnabled false } - } resourcePrefix "readerbook_" @@ -30,8 +28,8 @@ android { } dependencies { - compile project(':componentservice') - compile fileTree(dir: 'libs', include: ['*.jar']) + api project(':componentservice') + implementation fileTree(dir: 'libs', include: ['*.jar']) } combuild { diff --git a/readercomponent/src/main/runalone/AndroidManifest.xml b/readercomponent/src/main/runalone/AndroidManifest.xml index 262f347..acdb143 100644 --- a/readercomponent/src/main/runalone/AndroidManifest.xml +++ b/readercomponent/src/main/runalone/AndroidManifest.xml @@ -1,6 +1,6 @@ + xmlns:tools="http://schemas.android.com/tools" + package="com.mrzhang.reader"> - + - + diff --git a/repo/com/mrzhang/andcomponent/build-gradle/0.0.3/build-gradle-0.0.3.jar b/repo/com/mrzhang/andcomponent/build-gradle/0.0.3/build-gradle-0.0.3.jar new file mode 100644 index 0000000..2957053 Binary files /dev/null and b/repo/com/mrzhang/andcomponent/build-gradle/0.0.3/build-gradle-0.0.3.jar differ diff --git a/repo/com/mrzhang/andcomponent/build-gradle/0.0.3/build-gradle-0.0.3.jar.md5 b/repo/com/mrzhang/andcomponent/build-gradle/0.0.3/build-gradle-0.0.3.jar.md5 new file mode 100644 index 0000000..6b8aaf6 --- /dev/null +++ b/repo/com/mrzhang/andcomponent/build-gradle/0.0.3/build-gradle-0.0.3.jar.md5 @@ -0,0 +1 @@ +e21ae5909e8d17fafc04be3d4377b5a0 \ No newline at end of file diff --git a/repo/com/mrzhang/andcomponent/build-gradle/0.0.3/build-gradle-0.0.3.jar.sha1 b/repo/com/mrzhang/andcomponent/build-gradle/0.0.3/build-gradle-0.0.3.jar.sha1 new file mode 100644 index 0000000..911e4ca --- /dev/null +++ b/repo/com/mrzhang/andcomponent/build-gradle/0.0.3/build-gradle-0.0.3.jar.sha1 @@ -0,0 +1 @@ +6c09a1b0f212ba4e92bc397b74462cdfe2103917 \ No newline at end of file diff --git a/repo/com/mrzhang/andcomponent/build-gradle/0.0.3/build-gradle-0.0.3.pom b/repo/com/mrzhang/andcomponent/build-gradle/0.0.3/build-gradle-0.0.3.pom new file mode 100644 index 0000000..019fbf5 --- /dev/null +++ b/repo/com/mrzhang/andcomponent/build-gradle/0.0.3/build-gradle-0.0.3.pom @@ -0,0 +1,22 @@ + + + 4.0.0 + com.mrzhang.andcomponent + build-gradle + 0.0.3 + + + com.android.tools.build + gradle + 2.3.2 + compile + + + org.javassist + javassist + 3.20.0-GA + compile + + + diff --git a/repo/com/mrzhang/andcomponent/build-gradle/0.0.3/build-gradle-0.0.3.pom.md5 b/repo/com/mrzhang/andcomponent/build-gradle/0.0.3/build-gradle-0.0.3.pom.md5 new file mode 100644 index 0000000..4cb1ec6 --- /dev/null +++ b/repo/com/mrzhang/andcomponent/build-gradle/0.0.3/build-gradle-0.0.3.pom.md5 @@ -0,0 +1 @@ +2da4c2f963d0cb7cb55c5ebb7c259d19 \ No newline at end of file diff --git a/repo/com/mrzhang/andcomponent/build-gradle/0.0.3/build-gradle-0.0.3.pom.sha1 b/repo/com/mrzhang/andcomponent/build-gradle/0.0.3/build-gradle-0.0.3.pom.sha1 new file mode 100644 index 0000000..962866b --- /dev/null +++ b/repo/com/mrzhang/andcomponent/build-gradle/0.0.3/build-gradle-0.0.3.pom.sha1 @@ -0,0 +1 @@ +3e7a355f3e4c86cc7e4b620666f03cdd199dc2b4 \ No newline at end of file diff --git a/repo/com/mrzhang/andcomponent/build-gradle/0.0.4/build-gradle-0.0.4.jar b/repo/com/mrzhang/andcomponent/build-gradle/0.0.4/build-gradle-0.0.4.jar new file mode 100644 index 0000000..be47307 Binary files /dev/null and b/repo/com/mrzhang/andcomponent/build-gradle/0.0.4/build-gradle-0.0.4.jar differ diff --git a/repo/com/mrzhang/andcomponent/build-gradle/0.0.4/build-gradle-0.0.4.jar.md5 b/repo/com/mrzhang/andcomponent/build-gradle/0.0.4/build-gradle-0.0.4.jar.md5 new file mode 100644 index 0000000..3e16153 --- /dev/null +++ b/repo/com/mrzhang/andcomponent/build-gradle/0.0.4/build-gradle-0.0.4.jar.md5 @@ -0,0 +1 @@ +7307f09e7353eaef7203068f4bbff54f \ No newline at end of file diff --git a/repo/com/mrzhang/andcomponent/build-gradle/0.0.4/build-gradle-0.0.4.jar.sha1 b/repo/com/mrzhang/andcomponent/build-gradle/0.0.4/build-gradle-0.0.4.jar.sha1 new file mode 100644 index 0000000..514a92b --- /dev/null +++ b/repo/com/mrzhang/andcomponent/build-gradle/0.0.4/build-gradle-0.0.4.jar.sha1 @@ -0,0 +1 @@ +b592784f574daed3a612f85cb24cba9e931bd962 \ No newline at end of file diff --git a/repo/com/mrzhang/andcomponent/build-gradle/0.0.4/build-gradle-0.0.4.pom b/repo/com/mrzhang/andcomponent/build-gradle/0.0.4/build-gradle-0.0.4.pom new file mode 100644 index 0000000..e059e78 --- /dev/null +++ b/repo/com/mrzhang/andcomponent/build-gradle/0.0.4/build-gradle-0.0.4.pom @@ -0,0 +1,22 @@ + + + 4.0.0 + com.mrzhang.andcomponent + build-gradle + 0.0.4 + + + com.android.tools.build + gradle + 2.3.2 + compile + + + org.javassist + javassist + 3.20.0-GA + compile + + + diff --git a/repo/com/mrzhang/andcomponent/build-gradle/0.0.4/build-gradle-0.0.4.pom.md5 b/repo/com/mrzhang/andcomponent/build-gradle/0.0.4/build-gradle-0.0.4.pom.md5 new file mode 100644 index 0000000..d74ccbd --- /dev/null +++ b/repo/com/mrzhang/andcomponent/build-gradle/0.0.4/build-gradle-0.0.4.pom.md5 @@ -0,0 +1 @@ +0ababefa5727db9280d2cad08a16f585 \ No newline at end of file diff --git a/repo/com/mrzhang/andcomponent/build-gradle/0.0.4/build-gradle-0.0.4.pom.sha1 b/repo/com/mrzhang/andcomponent/build-gradle/0.0.4/build-gradle-0.0.4.pom.sha1 new file mode 100644 index 0000000..7f8a4aa --- /dev/null +++ b/repo/com/mrzhang/andcomponent/build-gradle/0.0.4/build-gradle-0.0.4.pom.sha1 @@ -0,0 +1 @@ +fe6372fe4e6e072aa38181e83a951fd833f5bd8b \ No newline at end of file diff --git a/repo/com/mrzhang/andcomponent/build-gradle/0.0.5/build-gradle-0.0.5.jar b/repo/com/mrzhang/andcomponent/build-gradle/0.0.5/build-gradle-0.0.5.jar new file mode 100644 index 0000000..56dbd9a Binary files /dev/null and b/repo/com/mrzhang/andcomponent/build-gradle/0.0.5/build-gradle-0.0.5.jar differ diff --git a/repo/com/mrzhang/andcomponent/build-gradle/0.0.5/build-gradle-0.0.5.jar.md5 b/repo/com/mrzhang/andcomponent/build-gradle/0.0.5/build-gradle-0.0.5.jar.md5 new file mode 100644 index 0000000..73c710a --- /dev/null +++ b/repo/com/mrzhang/andcomponent/build-gradle/0.0.5/build-gradle-0.0.5.jar.md5 @@ -0,0 +1 @@ +cfa84f0c5b21e2370a1ac864d5f564da \ No newline at end of file diff --git a/repo/com/mrzhang/andcomponent/build-gradle/0.0.5/build-gradle-0.0.5.jar.sha1 b/repo/com/mrzhang/andcomponent/build-gradle/0.0.5/build-gradle-0.0.5.jar.sha1 new file mode 100644 index 0000000..bdf1ec4 --- /dev/null +++ b/repo/com/mrzhang/andcomponent/build-gradle/0.0.5/build-gradle-0.0.5.jar.sha1 @@ -0,0 +1 @@ +864c8482a5e5a6dd409ce00543f4341a7d9ac8d6 \ No newline at end of file diff --git a/repo/com/mrzhang/andcomponent/build-gradle/0.0.5/build-gradle-0.0.5.pom b/repo/com/mrzhang/andcomponent/build-gradle/0.0.5/build-gradle-0.0.5.pom new file mode 100644 index 0000000..ee84b16 --- /dev/null +++ b/repo/com/mrzhang/andcomponent/build-gradle/0.0.5/build-gradle-0.0.5.pom @@ -0,0 +1,22 @@ + + + 4.0.0 + com.mrzhang.andcomponent + build-gradle + 0.0.5 + + + com.android.tools.build + gradle + 3.0.1 + compile + + + org.javassist + javassist + 3.20.0-GA + compile + + + diff --git a/repo/com/mrzhang/andcomponent/build-gradle/0.0.5/build-gradle-0.0.5.pom.md5 b/repo/com/mrzhang/andcomponent/build-gradle/0.0.5/build-gradle-0.0.5.pom.md5 new file mode 100644 index 0000000..7255b64 --- /dev/null +++ b/repo/com/mrzhang/andcomponent/build-gradle/0.0.5/build-gradle-0.0.5.pom.md5 @@ -0,0 +1 @@ +dabedfaaa53cb5c1124abb9166b14287 \ No newline at end of file diff --git a/repo/com/mrzhang/andcomponent/build-gradle/0.0.5/build-gradle-0.0.5.pom.sha1 b/repo/com/mrzhang/andcomponent/build-gradle/0.0.5/build-gradle-0.0.5.pom.sha1 new file mode 100644 index 0000000..d7f8505 --- /dev/null +++ b/repo/com/mrzhang/andcomponent/build-gradle/0.0.5/build-gradle-0.0.5.pom.sha1 @@ -0,0 +1 @@ +717d54d7bc1405f54dea1f3c6f5ae36fcd70f1d5 \ No newline at end of file diff --git a/repo/com/mrzhang/andcomponent/build-gradle/maven-metadata.xml b/repo/com/mrzhang/andcomponent/build-gradle/maven-metadata.xml index 832e4e4..fd4c9ec 100644 --- a/repo/com/mrzhang/andcomponent/build-gradle/maven-metadata.xml +++ b/repo/com/mrzhang/andcomponent/build-gradle/maven-metadata.xml @@ -3,11 +3,14 @@ com.mrzhang.andcomponent build-gradle - 0.0.2 + 0.0.5 0.0.1 0.0.2 + 0.0.3 + 0.0.4 + 0.0.5 - 20171012142404 + 20171206064228 diff --git a/repo/com/mrzhang/andcomponent/build-gradle/maven-metadata.xml.md5 b/repo/com/mrzhang/andcomponent/build-gradle/maven-metadata.xml.md5 index 42bb9fd..03b1062 100644 --- a/repo/com/mrzhang/andcomponent/build-gradle/maven-metadata.xml.md5 +++ b/repo/com/mrzhang/andcomponent/build-gradle/maven-metadata.xml.md5 @@ -1 +1 @@ -5c112f4a9bc4bfed3c259d56da49ea1f \ No newline at end of file +9eb76e0b1bdecb98ef2e8d19e866ad66 \ No newline at end of file diff --git a/repo/com/mrzhang/andcomponent/build-gradle/maven-metadata.xml.sha1 b/repo/com/mrzhang/andcomponent/build-gradle/maven-metadata.xml.sha1 index 398f6b1..345d379 100644 --- a/repo/com/mrzhang/andcomponent/build-gradle/maven-metadata.xml.sha1 +++ b/repo/com/mrzhang/andcomponent/build-gradle/maven-metadata.xml.sha1 @@ -1 +1 @@ -ad28b21fd949ca5df36676adddf2eda578830ce6 \ No newline at end of file +6fef0e6f9bb1b202d8a36c4b923c07ef98a22c3d \ No newline at end of file diff --git a/sharecomponent/build.gradle b/sharecomponent/build.gradle index 4ce32f6..cad0a3f 100644 --- a/sharecomponent/build.gradle +++ b/sharecomponent/build.gradle @@ -1,12 +1,11 @@ apply plugin: 'com.dd.comgradle' android { - compileSdkVersion 25 - buildToolsVersion "25.0.2" + compileSdkVersion 26 defaultConfig { minSdkVersion 15 - targetSdkVersion 14 + targetSdkVersion 26 versionCode 1 versionName "1.0" @@ -25,7 +24,7 @@ android { } dependencies { - compile project(':componentservice') + api project(':componentservice') } combuild { diff --git a/sharecomponent/src/main/runalone/AndroidManifest.xml b/sharecomponent/src/main/runalone/AndroidManifest.xml index 832a39b..c61a04e 100644 --- a/sharecomponent/src/main/runalone/AndroidManifest.xml +++ b/sharecomponent/src/main/runalone/AndroidManifest.xml @@ -1,6 +1,5 @@