Skip to content

Commit 6c62260

Browse files
authored
Merge pull request #1263 from Catrobat/release-2.10.0
Release 2.10.0
2 parents e0df628 + b4b072f commit 6c62260

File tree

667 files changed

+21494
-16925
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

667 files changed

+21494
-16925
lines changed

.github/workflows/sync_crowdin_Paintroid.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
steps:
4848
- uses: actions/checkout@v2
4949

50-
- uses: crowdin/github-action@1.0.10
50+
- uses: crowdin/github-action@v1.7.1
5151
with:
5252
upload_sources: true
5353
upload_translations: false

.github/workflows/sync_crowdin_colorpicker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
steps:
4848
- uses: actions/checkout@v2
4949

50-
- uses: crowdin/github-action@1.0.10
50+
- uses: crowdin/github-action@v1.7.1
5151
with:
5252
upload_sources: true
5353
upload_translations: false

.idea/codeStyles/Project.xml

Lines changed: 42 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Jenkinsfile

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,11 @@ pipeline {
3131
}
3232

3333
agent {
34-
dockerfile {
35-
filename 'Dockerfile.jenkins'
36-
// 'docker build' would normally copy the whole build-dir to the container, changing the
37-
// docker build directory avoids that overhead
38-
dir 'docker'
39-
// Pass the uid and the gid of the current user (jenkins-user) to the Dockerfile, so a
40-
// corresponding user can be added. This is needed to provide the jenkins user inside
41-
// the container for the ssh-agent to work.
42-
// Another way would be to simply map the passwd file, but would spoil additional information
43-
// Also hand in the group id of kvm to allow using /dev/kvm.
44-
additionalBuildArgs '--build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) --build-arg KVM_GROUP_ID=$(getent group kvm | cut -d: -f3)'
45-
// Ensure that each executor has its own gradle cache to not affect other builds
46-
// that run concurrently.
47-
args '--device /dev/kvm:/dev/kvm -m=6.5G'
48-
label useDebugLabelParameter('LimitedEmulator')
34+
docker {
35+
image 'catrobat/catrobat-paintroid:stable'
36+
args '--device /dev/kvm:/dev/kvm -v /var/local/container_shared/gradle_cache/$EXECUTOR_NUMBER:/home/user/.gradle -m=6.5G'
37+
label 'LimitedEmulator'
38+
alwaysPull true
4939
}
5040
}
5141

@@ -81,12 +71,13 @@ pipeline {
8171
sh 'rm -rf Catroid; mkdir Catroid'
8272
dir('Catroid') {
8373
git branch: params.CATROID_BRANCH, url: 'https://github.com/Catrobat/Catroid.git'
84-
sh 'rm -f catroid/src/main/libs/*.aar'
85-
sh 'mv -f ../colorpicker/build/outputs/aar/colorpicker-debug.aar catroid/src/main/libs/colorpicker-LOCAL.aar'
86-
sh 'mv -f ../Paintroid/build/outputs/aar/Paintroid-debug.aar catroid/src/main/libs/Paintroid-LOCAL.aar'
87-
88-
archiveArtifacts 'catroid/src/main/libs/colorpicker-LOCAL.aar'
89-
archiveArtifacts 'catroid/src/main/libs/Paintroid-LOCAL.aar'
74+
sh "rm -f catroid/src/main/libs/*.aar"
75+
sh "mv -f ../colorpicker/build/outputs/aar/colorpicker-debug.aar catroid/src/main/libs/colorpicker-LOCAL.aar"
76+
sh "mv -f ../Paintroid/build/outputs/aar/Paintroid-debug.aar catroid/src/main/libs/Paintroid-LOCAL.aar"
77+
}
78+
renameApks("${env.BRANCH_NAME}-${env.BUILD_NUMBER}")
79+
dir('Catroid') {
80+
archiveArtifacts "catroid/src/main/libs/*.aar"
9081
sh "./gradlew assembleCatroidDebug"
9182
archiveArtifacts 'catroid/build/outputs/apk/catroid/debug/catroid-catroid-debug.apk'
9283
}
@@ -124,10 +115,13 @@ pipeline {
124115

125116
stage('Device Tests') {
126117
steps {
127-
sh './gradlew -PenableCoverage -Pjenkins startEmulator adbDisableAnimationsGlobally createDebugCoverageReport -i'
118+
sh "echo no | avdmanager create avd --force --name android28 --package 'system-images;android-28;default;x86_64'"
119+
sh "/home/user/android/sdk/emulator/emulator -no-window -no-boot-anim -noaudio -avd android28 > /dev/null 2>&1 &"
120+
sh './gradlew -PenableCoverage -Pjenkins -Pemulator=android28 -Pci createDebugCoverageReport -i'
128121
}
129122
post {
130123
always {
124+
sh '/home/user/android/sdk/platform-tools/adb logcat -d > logcat.txt'
131125
sh './gradlew stopEmulator'
132126
junitAndCoverage "$reports/coverage/debug/report.xml", 'device', javaSrc
133127
archiveArtifacts 'logcat.txt'

Jenkinsfile.releaseAPK

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,11 @@
22

33
pipeline {
44
agent {
5-
dockerfile {
6-
filename 'Dockerfile.jenkins'
7-
// 'docker build' would normally copy the whole build-dir to the container, changing the
8-
// docker build directory avoids that overhead
9-
dir 'docker'
10-
// Pass the uid and the gid of the current user (jenkins-user) to the Dockerfile, so a
11-
// corresponding user can be added. This is needed to provide the jenkins user inside
12-
// the container for the ssh-agent to work.
13-
// Another way would be to simply map the passwd file, but would spoil additional information
14-
// Also hand in the group id of kvm to allow using /dev/kvm.
15-
additionalBuildArgs '--build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) --build-arg KVM_GROUP_ID=$(getent group kvm | cut -d: -f3)'
16-
// Ensure that each executor has its own gradle cache to not affect other builds
17-
// that run concurrently.
18-
args '--device /dev/kvm:/dev/kvm'
5+
docker {
6+
image 'catrobat/catrobat-paintroid:stable'
7+
args '--device /dev/kvm:/dev/kvm -v /var/local/container_shared/gradle_cache/$EXECUTOR_NUMBER:/home/user/.gradle -m=6.5G'
8+
label 'LimitedEmulator'
9+
alwaysPull true
1910
}
2011
}
2112

Paintroid/build.gradle

Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Paintroid: An image manipulation application for Android.
3-
* Copyright (C) 2010-2015 The Catrobat Team
3+
* Copyright (C) 2010-2022 The Catrobat Team
44
* (<http://developer.catrobat.org/credits>)
55
*
66
* This program is free software: you can redistribute it and/or modify
@@ -17,7 +17,15 @@
1717
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1818
*/
1919

20+
apply plugin: 'com.android.library'
21+
apply plugin: 'com.hiya.jacoco-android'
22+
apply plugin: 'com.getkeepsafe.dexcount'
23+
apply plugin: 'kotlin-android'
2024
apply plugin: 'org.catrobat.gradle.androidemulators'
25+
apply plugin: 'maven-publish'
26+
27+
apply from: 'gradle/adb_tasks.gradle'
28+
apply from: 'gradle/code_quality_tasks.gradle'
2129

2230
emulators {
2331
install project.hasProperty('installSdk')
@@ -42,17 +50,8 @@ emulators {
4250
}
4351
}
4452

45-
apply plugin: 'com.android.library'
46-
apply plugin: 'com.hiya.jacoco-android'
47-
apply plugin: 'com.github.panpf.bintray-publish'
48-
apply plugin: 'com.getkeepsafe.dexcount'
49-
apply plugin: 'kotlin-android'
50-
51-
apply from: 'gradle/adb_tasks.gradle'
52-
apply from: 'gradle/code_quality_tasks.gradle'
53-
5453
jacoco {
55-
toolVersion = "0.8.5"
54+
toolVersion = "0.8.7"
5655
}
5756

5857
jacocoAndroidUnitTestReport {
@@ -74,8 +73,8 @@ android {
7473
}
7574

7675
compileOptions {
77-
sourceCompatibility JavaVersion.VERSION_1_8
78-
targetCompatibility JavaVersion.VERSION_1_8
76+
sourceCompatibility JavaVersion.VERSION_11
77+
targetCompatibility JavaVersion.VERSION_11
7978
}
8079

8180
buildTypes {
@@ -98,7 +97,6 @@ android {
9897
// specific ignores should be defined via lint.xml file
9998
lintConfig file('config/lint.xml')
10099
ignore 'ClickableViewAccessibility', 'StaticFieldLeak', 'GradleDependency', 'OldTargetApi', 'LintBaseline'
101-
baseline file('config/lint-baseline.xml')
102100
textReport true
103101
xmlReport true
104102
htmlReport true
@@ -129,6 +127,7 @@ dependencies {
129127
implementation 'androidx.exifinterface:exifinterface:1.3.2'
130128
implementation 'com.esotericsoftware:kryo:5.1.1'
131129
implementation 'id.zelory:compressor:2.1.1'
130+
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
132131

133132
debugImplementation 'androidx.multidex:multidex:2.0.0'
134133

@@ -137,36 +136,27 @@ dependencies {
137136

138137
testImplementation 'junit:junit:4.12'
139138
testImplementation 'org.mockito:mockito-core:2.18.3'
139+
testImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0'
140140

141141
androidTestImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.4.3'
142-
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
142+
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
143143
androidTestImplementation 'androidx.test:rules:1.1.1'
144144
androidTestImplementation 'org.mockito:mockito-android:2.18.3'
145145
androidTestImplementation 'tools.fastlane:screengrab:2.1.0'
146+
androidTestImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0'
146147

147148
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
148149
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.1.0'
149150
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.1.0'
150151
androidTestImplementation "androidx.test.uiautomator:uiautomator:2.2.0"
152+
testImplementation "androidx.test:core-ktx:1.4.0"
153+
implementation 'com.android.support.test.espresso:espresso-idling-resource:3.1.0'
151154
}
152155

153156
tasks.withType(Javadoc).all {
154157
enabled = false
155158
}
156159

157-
publish {
158-
userOrg = 'catrobat'
159-
repoName = 'Paintroid'
160-
groupId = 'org.catrobat.paintroid'
161-
artifactId = 'paintroid'
162-
publishVersion = rootProject.ext.androidVersionName
163-
licences = ['AGPL-V3']
164-
desc = 'A graphical paint editor library for Android'
165-
website = 'https://github.com/Catrobat/Paintroid'
166-
issueTracker = 'https://jira.catrob.at/browse/PAINTROID'
167-
repository = "${website}.git"
168-
}
169-
170160
if (project.hasProperty('jenkins')) {
171161
android.dexOptions.preDexLibraries = false
172162
}

Paintroid/config/checkstyle.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
* Paintroid: An image manipulation application for Android.
4-
* Copyright (C) 2010-2015 The Catrobat Team
4+
* Copyright (C) 2010-2022 The Catrobat Team
55
* (<http://developer.catrobat.org/credits>)
66
*
77
* This program is free software: you can redistribute it and/or modify
@@ -296,8 +296,4 @@
296296
<property name="onCommentFormat" value="@formatter\:on" />
297297
</module>
298298

299-
<module name="SuppressionFilter">
300-
<property name="file" value="Paintroid/config/checkstyle_suppressions.xml" />
301-
</module>
302-
303299
</module>

Paintroid/config/checkstyle_suppressions.xml

Lines changed: 0 additions & 24 deletions
This file was deleted.

Paintroid/config/detekt.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ complexity:
6363
active: false
6464
ignoredLabels: ""
6565
LargeClass:
66-
active: true
67-
threshold: 650
66+
active: false
67+
threshold: 1000
6868
LongMethod:
6969
active: true
7070
threshold: 80
@@ -203,7 +203,7 @@ formatting:
203203
active: false
204204
autoCorrect: true
205205
Indentation:
206-
active: true
206+
active: false
207207
autoCorrect: true
208208
indentSize: 4
209209
continuationIndentSize: 4
@@ -253,7 +253,7 @@ formatting:
253253
active: true
254254
autoCorrect: true
255255
ParameterListWrapping:
256-
active: true
256+
active: false
257257
autoCorrect: true
258258
indentSize: 4
259259
SpacingAroundColon:
@@ -509,7 +509,7 @@ style:
509509
SafeCast:
510510
active: true
511511
SerialVersionUIDInSerializableClass:
512-
active: true
512+
active: false
513513
SpacingBetweenPackageAndImports:
514514
active: true
515515
ThrowsCount:

Paintroid/config/lint-baseline.xml

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)