Skip to content

Commit

Permalink
Upgrade buildscript
Browse files Browse the repository at this point in the history
  • Loading branch information
gsantner committed Feb 3, 2018
1 parent 4995378 commit 4993b9d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
4 changes: 2 additions & 2 deletions app/src/main/res/values/strings-not_translatable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@

<!-- You are NOT allowed to remove parts of the license text below-->
<string name="copyright_short" translatable="false">
Copyright © 2016-2017
Copyright © 2016-2018
\nMemeTastic contributors
</string>
<string name="copyright_license_text_official" translatable="false"><![CDATA[
### Copyright © 2016-2017
### Copyright © 2016-2018
\n**MemeTastic contributors**
\n
\n**Get the official version of MemeTastic:**
Expand Down
25 changes: 16 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
ext.version_setup_compileSdk = 27
ext.version_setup_minSdk = 17
ext.version_setup_targetSdk = ext.version_setup_compileSdk
ext.version_setup_buildTools = "27.0.1" // Specifying optional
ext.version_setup_buildTools = "27.0.3" // Specifying optional

// https://developer.android.com/studio/releases/gradle-plugin.html
ext.version_gradle_tools = "3.0.1"
Expand All @@ -16,8 +16,8 @@ buildscript {
ext.version_library_commonmark = "0.10.0"
// https://github.com/guardianproject/NetCipher/releases
ext.version_library_netcipher = "2.0.0-alpha1"
// https://github.com/JetBrains/kotlin/blob/master/ReadMe.md
ext.version_plugin_kotlin = "1.1.60"
// https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-gradle-plugin#LookAtCentral
ext.version_plugin_kotlin = "1.2.21"
ext.enable_plugin_kotlin = false

repositories {
Expand All @@ -43,6 +43,10 @@ allprojects {
mavenCentral()
maven { url "https://jitpack.io" }
}

tasks.matching { task -> task.name.matches('.*generate.*Resources') }.all {
task -> task.dependsOn copyRepoFiles
}
}

task clean(type: Delete) {
Expand All @@ -54,7 +58,7 @@ task copyRepoFiles(type: Copy) {
from rootProject.files(ROOT_TO_RAW_COPYFILES)
into "app/src/main/res/raw"
rename { String fileName -> fileName.replace(fileName, fileName.toLowerCase()) }
}; tasks.copyRepoFiles.execute()
}


@SuppressWarnings(["UnnecessaryQualifiedReference", "SpellCheckingInspection", "GroovyUnusedDeclaration"])
Expand All @@ -75,10 +79,13 @@ static String getUsedAndroidLanguages() {
}

ext.getGitHash = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-parse', 'HEAD'
standardOutput = stdout
try {
def stdout = new ByteArrayOutputStream() exec {
commandLine 'git', 'rev-parse', 'HEAD'
standardOutput = stdout
}
return stdout.toString().trim()
} catch (Exception ignore) {
return '???'
}
return stdout.toString().trim()
}

0 comments on commit 4993b9d

Please sign in to comment.