Skip to content

Commit

Permalink
0.7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
typ0520 committed Oct 20, 2017
1 parent bb33c60 commit 3bc53a0
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 29 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.7.4 (2017-10-20)

Bugfixes:

- 修复自定义编译任务增量对比的问题

## 0.7.3 (2017-10-20)

Bugfixes:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Android API 9(2.3)+ ; android-gradle-build 2.0.0+
}
dependencies {
classpath 'com.github.typ0520:fastdex-gradle:0.7.3'
classpath 'com.github.typ0520:fastdex-gradle:0.7.4'
}
}
````
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,25 @@ public int hashCode() {
int result = super.hashCode();
int nowLastModified = 0;

if (now != null) {
nowLastModified = (int) (((FileNode)now).lastModified ^ (((FileNode)now).lastModified >>> 32));
if (now != null && now.md5 == null) {
nowLastModified = (int) (now.lastModified ^ (now.lastModified >>> 32));
}

int oldLastModified = 0;
if (old != null) {
oldLastModified = (int) (((FileNode)old).lastModified ^ (((FileNode)old).lastModified >>> 32));
if (old != null && old.md5 == null) {
oldLastModified = (int) (old.lastModified ^ (old.lastModified >>> 32));
}

int nowFileLength = 0;
int oldFileLength = 0;
if (now != null) {
nowFileLength = (int) (((FileNode)now).fileLength ^ (((FileNode)now).fileLength >>> 32));
nowFileLength = (int) (now.fileLength ^ (now.fileLength >>> 32));
}
if (old != null) {
oldFileLength = (int) (((FileNode)old).fileLength ^ (((FileNode)old).fileLength >>> 32));
oldFileLength = (int) (old.fileLength ^ (old.fileLength >>> 32));
}
result = 31 * result + (now != null ? (now.hashCode() + nowLastModified + nowFileLength) : 0);
result = 31 * result + (old != null ? (old.hashCode() + oldLastModified + oldFileLength) : 0);
result = 31 * result + (now != null && now.md5 != null ? (now.md5.hashCode() + nowLastModified + nowFileLength) : 0);
result = 31 * result + (old != null && old.md5 != null ? (old.md5.hashCode() + oldLastModified + oldFileLength) : 0);
return result;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@
* Created by tong on 17/3/29.
*/
public class FileNode extends Node {
//public String absolutePath;
public String nodePath;
public String md5;
public long lastModified;
public long fileLength;
public String md5;

@Override
public String getUniqueKey() {
Expand All @@ -22,20 +21,19 @@ public String getUniqueKey() {

@Override
public boolean diffEquals(Node anNode) {
if (this == anNode) return true;
if (anNode == null) return false;
if (!super.diffEquals(anNode))
return false;

FileNode fileNode = (FileNode) anNode;
if (fileLength != fileNode.fileLength) return false;


if (lastModified != fileNode.lastModified) {
if (md5 != null && md5.equals(((FileNode) anNode).md5)) {
return true;
}
if (fileLength != fileNode.fileLength)
return false;

if (md5 != null) {
return md5.equals(((FileNode) anNode).md5);
}
else {
return lastModified == fileNode.lastModified;
}
return equals(fileNode);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Created by tong on 17/3/31.
*/
public class SourceSetDiffResultSet extends DiffResultSet<StringDiffInfo> {
public final Set<JavaFileDiffInfo> changedJavaFileDiffInfos = new HashSet<JavaFileDiffInfo>();
public final Set<JavaFileDiffInfo> changedJavaFileDiffInfos = new HashSet<>();

@Expose
public Set<String> addOrModifiedClasses = new HashSet<>();
Expand Down Expand Up @@ -86,9 +86,7 @@ public boolean equals(Object o) {
if (!super.equals(o)) return false;

SourceSetDiffResultSet resultSet = (SourceSetDiffResultSet) o;

return changedJavaFileDiffInfos != null ? changedJavaFileDiffInfos.equals(resultSet.changedJavaFileDiffInfos) : resultSet.changedJavaFileDiffInfos == null;

return changedJavaFileDiffInfos.equals(resultSet.changedJavaFileDiffInfos);
}

@Override
Expand Down
4 changes: 4 additions & 0 deletions fastdex-gradle/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@ tasks['install'].doLast {
if ("install".equals(launchTaskName)) {
project.file('build/libs').deleteDir()
}
}

tasks['bintrayUpload'].doLast {
project.file('build/libs').deleteDir()
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ package fastdex.build.task
import fastdex.build.util.Constants
import fastdex.common.utils.FileUtils
import fastdex.build.variant.FastdexVariant
import org.gradle.api.DefaultTask
import org.gradle.api.Project
import org.gradle.api.tasks.TaskAction
import fastdex.build.lib.aapt.AaptResourceCollector
import fastdex.build.lib.aapt.AaptUtil
import fastdex.build.lib.aapt.PatchUtil
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
org.gradle.daemon=true

groupId=com.github.typ0520
version=0.7.3
version=0.7.4

ANDROID_BUILD_MIN_SDK_VERSION=14
ANDROID_BUILD_TARGET_SDK_VERSION=22
Expand Down
2 changes: 1 addition & 1 deletion sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildscript {
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath "me.tatarka:gradle-retrolambda:3.6.0"
classpath 'com.jakewharton:butterknife-gradle-plugin:8.8.1'
classpath 'com.github.typ0520:fastdex-gradle:0.7.3'
classpath 'com.github.typ0520:fastdex-gradle:0.7.4'
}
}

Expand Down

0 comments on commit 3bc53a0

Please sign in to comment.