Skip to content

Commit

Permalink
remove build-time from complied app
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Nüsse <[email protected]>
  • Loading branch information
newhinton committed May 18, 2023
1 parent 0d2e145 commit 04a40ad
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
3 changes: 0 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,11 @@ android {
debug {
minifyEnabled false
shrinkResources false
buildConfigField "java.lang.long", "BUILD_TIME", "0L"
}
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField "java.lang.long", "BUILD_TIME", String.valueOf(System.currentTimeMillis()) + "L"
}
}

Expand All @@ -60,7 +58,6 @@ android {
// OSS build
oss {
dimension 'edition'
buildConfigField "java.lang.long", "BUILD_TIME", "0L"
}
}

Expand Down
10 changes: 0 additions & 10 deletions app/src/main/java/ca/pkay/rcloneexplorer/pkg/PackageUpdate.java
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO
@Nullable
private String getApkUrl(GitHubRelease release) {
// Since the app is not published immediately during build, 60 minutes are added
long minStamp = BuildConfig.BUILD_TIME + 1000 * 60 * 60;
String[] supportedAbis = Build.SUPPORTED_ABIS;
for (ReleaseAsset asset : release.getAssets()) {
for (String supportedAbi : supportedAbis) {
if (asset.getName().contains(supportedAbi)
&& release.getCreatedAt() >= minStamp) {
return asset.getUrl();
}
}
}
return null;
}

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Wed Aug 10 09:30:47 CEST 2022
org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M"
org.gradle.jvmargs=-Xmx4093M -Dkotlin.daemon.jvm.options\="-Xmx4096M"
android.enableJetifier=false
android.useAndroidX=true
de.felixnuesse.extract.rCloneVersion=1.61.1
Expand Down

0 comments on commit 04a40ad

Please sign in to comment.