forked from AnySoftKeyboard/AnySoftKeyboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
65 lines (56 loc) · 2.15 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import java.util.function.BiConsumer
import java.util.stream.Stream
import java.nio.file.Files
System.setProperty("file.encoding", "UTF-8")
def logFile = new File(buildDir.absoluteFile,"build-logging/build-log-${System.currentTimeMillis()}.log")
gradle.addBuildListener(new BuildLogger(logFile))
buildscript {
repositories {
google()
mavenLocal()
maven { url 'https://repo1.maven.org/maven2' /*maven-central with HTTPS*/ }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.github.triplet.gradle:play-publisher:3.7.0'
classpath 'net.ltgt.gradle:gradle-errorprone-plugin:3.0.1'
classpath 'gradle.plugin.com.github.sherter.google-java-format:google-java-format-gradle-plugin:0.9'
classpath 'androidx.navigation:navigation-safe-args-gradle-plugin:2.5.3'
}
}
apply plugin: 'com.github.sherter.google-java-format'
apply plugin: 'anysoftkeyboard-contributors'
googleJavaFormat {
toolVersion = '1.16.0'
options style: 'AOSP'
}
allprojects {
repositories {
google()
mavenLocal()
gradlePluginPortal()
maven { url 'https://repo1.maven.org/maven2' /*maven-central with HTTPS*/ }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
}
}
apply from: "${rootDir}/gradle/emoji_generator.gradle"
apply from: "${rootDir}/gradle/root_all_projects_ext.gradle"
apply from: "${rootDir}/gradle/fdroid_yaml_output.gradle"
tasks.register("clean", Delete) {
delete buildDir
//we do not want to delete the current log file
logFile.parentFile.listFiles().each {
if (it != null && it.absolutePath != logFile.absolutePath) {
delete it
}
}
//deleting all beta/production change-logs
Stream<Path> files = Files.walk(rootDir.toPath())
files.sorted(Comparator.reverseOrder())
.map { it.toFile() }
.filter { it.name == 'beta.txt' || it.name == 'production.txt' }
.forEach { it.deleteOnExit() }
files.close()
}