Skip to content

Commit 5771c08

Browse files
author
Thomas Schwengler
committed
MAINTENANCE: Improve build scripts
* Upgrade gradle to `5.6.4` * Upgrade android gradle plugin to `3.5.2` * Upgrade support library version to `28.0.0` * Upgrade LibGDX to `1.9.10` * This should fix some warnings with calls to graylisted functions * Upgrade checkstyle to `8.26` * Upgrade kotlin gradle plugin to `1.3.60` * Move `fabric.properties` to a template file and generate it from buildscript * Fix some kotlin warnings * Remove obsolete property from `gradle.properties` * Upgrade fabric gradle plugin to fix some warnings * Upgrade `detekt` to a stable version (was RC before) * Update detekt config from default config, migrate `test-pattern` excludes * Move androidemulators specific configuration into a separate file * Group ext variables into one block * Move `detekt` configuration into `code_quality_tasks` * Create a `copyGoogleServicesFile` function to improve readability * Simplify flavor declaration * Group `buildConfigField` properties * Move `buildConfigField` properties into the default configuration and overwrite in flavors * Remove unused `FEATURE_CLOUD_MESSAGING_ENABLED` build config field * Add dependency to `copyAndroidNatives` as done in the libGDX example gradle file
1 parent edf7112 commit 5771c08

15 files changed

+332
-314
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ __pycache__
6060

6161
#api-keys
6262
catroid/google-services.json
63+
catroid/fabric.properties
6364

6465
#Crowdin folder
6566
crowdin/

build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2525

2626
buildscript {
27-
ext.kotlin_version = '1.3.10'
27+
ext.kotlin_version = '1.3.60'
2828
repositories {
2929
google()
3030
jcenter()
@@ -33,7 +33,7 @@ buildscript {
3333
dependencies {
3434
// NOTE: Do not place your application dependencies here; they belong
3535
// in the individual module build.gradle files
36-
classpath 'com.android.tools.build:gradle:3.5.0'
36+
classpath 'com.android.tools.build:gradle:3.5.2'
3737
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
3838
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.4'
3939
classpath 'org.catrobat.gradle.androidemulators:android-emulators-gradle:1.6.2'

catroid/build.gradle

+116-232
Large diffs are not rendered by default.

catroid/config/checkstyle.xml

+13-14
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@
3030
<module name="TreeWalker">
3131
<property name="tabWidth" value="4" />
3232

33-
<!-- To enable SuppressWithNearbyCommentFilter -->
34-
<module name="FileContentsHolder" />
35-
3633
<!-- Annotations -->
3734
<module name="AnnotationLocation">
3835
<property name="allowSamelineMultipleAnnotations" value="false" />
@@ -172,8 +169,10 @@
172169
<module name="ImportOrder">
173170
<property name="option" value="bottom" />
174171
<property name="groups" value="android,com,cucumber,edu,junit,net,org,java,javax" />
172+
<property name="staticGroups" value="android,com,cucumber,edu,junit,net,org,java,javax" />
175173
<property name="ordered" value="true" />
176174
<property name="separated" value="true" />
175+
<property name="separatedStaticGroups" value="true" />
177176
</module>
178177
<module name="RedundantImport" />
179178
<module name="PackageDeclaration" />
@@ -230,6 +229,17 @@
230229
<property name="ignoreComments" value="true" />
231230
<property name="message" value="Spaces aren't allowed for indentation. Tabs only" />
232231
</module>
232+
233+
<module name="SuppressWithNearbyCommentFilter">
234+
<property name="commentFormat" value="CHECKSTYLE DISABLE ([\w\|]+) FOR (-?\d+) LINES" />
235+
<property name="checkFormat" value="$1" />
236+
<property name="influenceFormat" value="$2" />
237+
</module>
238+
239+
<module name="SuppressionCommentFilter">
240+
<property name="offCommentFormat" value="@formatter\:off" />
241+
<property name="onCommentFormat" value="@formatter\:on" />
242+
</module>
233243
</module>
234244

235245
<module name="NewlineAtEndOfFile">
@@ -289,17 +299,6 @@
289299
<property name="message" value="Use ellipses character … instead of &amp;#8230;." />
290300
</module>
291301

292-
<module name="SuppressWithNearbyCommentFilter">
293-
<property name="commentFormat" value="CHECKSTYLE DISABLE ([\w\|]+) FOR (-?\d+) LINES" />
294-
<property name="checkFormat" value="$1" />
295-
<property name="influenceFormat" value="$2" />
296-
</module>
297-
298-
<module name="SuppressionCommentFilter">
299-
<property name="offCommentFormat" value="@formatter\:off" />
300-
<property name="onCommentFormat" value="@formatter\:on" />
301-
</module>
302-
303302
<module name="SuppressionFilter">
304303
<property name="file" value="catroid/config/checkstyle_suppressions.xml" />
305304
</module>

0 commit comments

Comments
 (0)