Skip to content

Commit

Permalink
InstantRun support fixed;
Browse files Browse the repository at this point in the history
MultiDex ZipException fixed;
androidTest hot launch fail fixed;
  • Loading branch information
archinamon committed Jan 10, 2017
1 parent 5b03293 commit 580d6e1
Show file tree
Hide file tree
Showing 13 changed files with 75 additions and 64 deletions.
2 changes: 1 addition & 1 deletion AspectJ-gradle/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies {
}

group = 'com.archinamon'
version = '2.2.2'
version = '2.3.0'

// local archive :: debug mode
uploadArchives {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ def public static logAugmentationFinish() {
println "---------- Finish AspectJ transformer ----------";
}

def public static logNoAugmentation() {
println "---------- Exit AspectJ transformer w/o processing ----------";
}

def public static logEnvInvalid() {
println "Ajc classpath doesn't has needed runtime environment";
}

def public static logJarInpathAdded(JarInput jar) {
println "include jar :: $jar.file.absolutePath";
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,25 @@ import org.gradle.api.tasks.compile.JavaCompile

import static com.archinamon.StatusLogger.logAugmentationStart
import static com.archinamon.StatusLogger.logAugmentationFinish
import static com.archinamon.StatusLogger.logEnvInvalid
import static com.archinamon.StatusLogger.logJarAspectAdded
import static com.archinamon.StatusLogger.logJarInpathAdded
import static com.archinamon.StatusLogger.logNoAugmentation

class AspectTransform extends Transform {

def static final TRANSFORM_NAME = "aspectj";
def static final AJRUNTIME = "aspectjrt";

Project project;
AndroidConfig config;
AspectJExtension extension;

AspectJWeaver aspectJWeaver;
AspectJMergeJars aspectJMerger;

public AspectTransform(Project project) {
this.project = project;
this.aspectJWeaver = new AspectJWeaver(project);
this.aspectJMerger = new AspectJMergeJars(this);
}

def withConfig(AndroidConfig config) {
Expand Down Expand Up @@ -168,10 +169,15 @@ class AspectTransform extends Transform {
}
}

aspectJWeaver.doWeave();
aspectJMerger.doMerge(outputProvider, outputDir);
def hasAjRt = aspectJWeaver.classPath.find { it.name.contains(AJRUNTIME); };

logAugmentationFinish();
if (hasAjRt) {
aspectJWeaver.doWeave();
logAugmentationFinish();
} else {
logEnvInvalid();
logNoAugmentation();
}
}

/* Internal */
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ae82c7087ed16f7aa224ffc48d4df890
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0b8bf22020543b172a265837d42b38ea9bce1aea
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.archinamon</groupId>
<artifactId>android-gradle-aspectj</artifactId>
<version>2.3.0</version>
<dependencies>
<dependency>
<groupId>com.android.tools.build</groupId>
<artifactId>gradle</artifactId>
<version>2.2.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.8.9</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>1.8.9</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.android.tools.build</groupId>
<artifactId>transform-api</artifactId>
<version>1.5.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easytesting</groupId>
<artifactId>fest-assert-core</artifactId>
<version>2.0M10</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a1c9f28d7a1274cf6f732440352a7c46
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6a7b24242ea0505b3099a64c4c0bbf3cb11a2f76
5 changes: 3 additions & 2 deletions com/archinamon/android-gradle-aspectj/maven-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<groupId>com.archinamon</groupId>
<artifactId>android-gradle-aspectj</artifactId>
<versioning>
<release>2.2.2</release>
<release>2.3.0</release>
<versions>
<version>1.3.1</version>
<version>1.3.2</version>
Expand All @@ -18,7 +18,8 @@
<version>2.2.0</version>
<version>2.2.1</version>
<version>2.2.2</version>
<version>2.3.0</version>
</versions>
<lastUpdated>20161031214325</lastUpdated>
<lastUpdated>20170110090942</lastUpdated>
</versioning>
</metadata>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
64d4b5ba05c61134f0b9a8f9cc2430df
832988096c58beea668ad8e3d15030e7
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1b819e2c2925390f9f2214fd3807f91a83283998
38aa9eb28d91888157afc82b97045290b03ac7bf

0 comments on commit 580d6e1

Please sign in to comment.