From dba727bfcb714367b6302a9ad8bf83d70314c0cc Mon Sep 17 00:00:00 2001 From: Koitharu Date: Wed, 6 Nov 2024 09:28:42 +0200 Subject: [PATCH] Improvements for nightly build --- app/build.gradle | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 901f71bb2..6d055a77b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -48,6 +48,14 @@ android { viewBinding true buildConfig true } + packagingOptions { + resources { + excludes += [ + 'META-INF/README.md', + 'META-INF/NOTICE.md' + ] + } + } sourceSets { androidTest.assets.srcDirs += files("$projectDir/schemas".toString()) main.java.srcDirs += 'src/main/kotlin/' @@ -82,9 +90,9 @@ android { applicationVariants.configureEach { variant -> if (variant.name == 'nightly') { variant.outputs.each { output -> - def now = LocalDateTime.now().format("yyMMdd") - output.versionCodeOverride = now.toInteger() - output.versionNameOverride = 'N' + now + def now = LocalDateTime.now() + output.versionCodeOverride = now.format("yyMMdd").toInteger() + output.versionNameOverride = 'N' + now.format("yyyyMMdd") } } } @@ -97,7 +105,13 @@ afterEvaluate { } } dependencies { - implementation('com.github.KotatsuApp:kotatsu-parsers:f80b586081') { + def parsersVersion = "f80b586081" + if (System.properties.containsKey('parsersVersionOverride')) { + // usage: + // -DparsersVersionOverride=$(curl -s https://api.github.com/repos/kotatsuapp/kotatsu-parsers/commits/master -H "Accept: application/vnd.github.sha" | cut -c -10) + parsersVersion = System.getProperty('parsersVersionOverride') + } + implementation("com.github.KotatsuApp:kotatsu-parsers$parsersVersion") { exclude group: 'org.json', module: 'json' }