Skip to content

Commit

Permalink
Merge pull request #1263 from Catrobat/release-2.10.0
Browse files Browse the repository at this point in the history
Release 2.10.0
  • Loading branch information
wslany authored Apr 26, 2023
2 parents e0df628 + b4b072f commit 6c62260
Show file tree
Hide file tree
Showing 667 changed files with 21,494 additions and 16,925 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/sync_crowdin_Paintroid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: crowdin/github-action@1.0.10
- uses: crowdin/github-action@v1.7.1
with:
upload_sources: true
upload_translations: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync_crowdin_colorpicker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: crowdin/github-action@1.0.10
- uses: crowdin/github-action@v1.7.1
with:
upload_sources: true
upload_translations: false
Expand Down
42 changes: 42 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 16 additions & 22 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,11 @@ pipeline {
}

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

Expand Down Expand Up @@ -81,12 +71,13 @@ pipeline {
sh 'rm -rf Catroid; mkdir Catroid'
dir('Catroid') {
git branch: params.CATROID_BRANCH, url: 'https://github.com/Catrobat/Catroid.git'
sh 'rm -f catroid/src/main/libs/*.aar'
sh 'mv -f ../colorpicker/build/outputs/aar/colorpicker-debug.aar catroid/src/main/libs/colorpicker-LOCAL.aar'
sh 'mv -f ../Paintroid/build/outputs/aar/Paintroid-debug.aar catroid/src/main/libs/Paintroid-LOCAL.aar'

archiveArtifacts 'catroid/src/main/libs/colorpicker-LOCAL.aar'
archiveArtifacts 'catroid/src/main/libs/Paintroid-LOCAL.aar'
sh "rm -f catroid/src/main/libs/*.aar"
sh "mv -f ../colorpicker/build/outputs/aar/colorpicker-debug.aar catroid/src/main/libs/colorpicker-LOCAL.aar"
sh "mv -f ../Paintroid/build/outputs/aar/Paintroid-debug.aar catroid/src/main/libs/Paintroid-LOCAL.aar"
}
renameApks("${env.BRANCH_NAME}-${env.BUILD_NUMBER}")
dir('Catroid') {
archiveArtifacts "catroid/src/main/libs/*.aar"
sh "./gradlew assembleCatroidDebug"
archiveArtifacts 'catroid/build/outputs/apk/catroid/debug/catroid-catroid-debug.apk'
}
Expand Down Expand Up @@ -124,10 +115,13 @@ pipeline {

stage('Device Tests') {
steps {
sh './gradlew -PenableCoverage -Pjenkins startEmulator adbDisableAnimationsGlobally createDebugCoverageReport -i'
sh "echo no | avdmanager create avd --force --name android28 --package 'system-images;android-28;default;x86_64'"
sh "/home/user/android/sdk/emulator/emulator -no-window -no-boot-anim -noaudio -avd android28 > /dev/null 2>&1 &"
sh './gradlew -PenableCoverage -Pjenkins -Pemulator=android28 -Pci createDebugCoverageReport -i'
}
post {
always {
sh '/home/user/android/sdk/platform-tools/adb logcat -d > logcat.txt'
sh './gradlew stopEmulator'
junitAndCoverage "$reports/coverage/debug/report.xml", 'device', javaSrc
archiveArtifacts 'logcat.txt'
Expand Down
19 changes: 5 additions & 14 deletions Jenkinsfile.releaseAPK
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,11 @@

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

Expand Down
46 changes: 18 additions & 28 deletions Paintroid/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Paintroid: An image manipulation application for Android.
* Copyright (C) 2010-2015 The Catrobat Team
* Copyright (C) 2010-2022 The Catrobat Team
* (<http://developer.catrobat.org/credits>)
*
* This program is free software: you can redistribute it and/or modify
Expand All @@ -17,7 +17,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

apply plugin: 'com.android.library'
apply plugin: 'com.hiya.jacoco-android'
apply plugin: 'com.getkeepsafe.dexcount'
apply plugin: 'kotlin-android'
apply plugin: 'org.catrobat.gradle.androidemulators'
apply plugin: 'maven-publish'

apply from: 'gradle/adb_tasks.gradle'
apply from: 'gradle/code_quality_tasks.gradle'

emulators {
install project.hasProperty('installSdk')
Expand All @@ -42,17 +50,8 @@ emulators {
}
}

apply plugin: 'com.android.library'
apply plugin: 'com.hiya.jacoco-android'
apply plugin: 'com.github.panpf.bintray-publish'
apply plugin: 'com.getkeepsafe.dexcount'
apply plugin: 'kotlin-android'

apply from: 'gradle/adb_tasks.gradle'
apply from: 'gradle/code_quality_tasks.gradle'

jacoco {
toolVersion = "0.8.5"
toolVersion = "0.8.7"
}

jacocoAndroidUnitTestReport {
Expand All @@ -74,8 +73,8 @@ android {
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}

buildTypes {
Expand All @@ -98,7 +97,6 @@ android {
// specific ignores should be defined via lint.xml file
lintConfig file('config/lint.xml')
ignore 'ClickableViewAccessibility', 'StaticFieldLeak', 'GradleDependency', 'OldTargetApi', 'LintBaseline'
baseline file('config/lint-baseline.xml')
textReport true
xmlReport true
htmlReport true
Expand Down Expand Up @@ -129,6 +127,7 @@ dependencies {
implementation 'androidx.exifinterface:exifinterface:1.3.2'
implementation 'com.esotericsoftware:kryo:5.1.1'
implementation 'id.zelory:compressor:2.1.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

debugImplementation 'androidx.multidex:multidex:2.0.0'

Expand All @@ -137,36 +136,27 @@ dependencies {

testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.18.3'
testImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0'

androidTestImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.4.3'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test:rules:1.1.1'
androidTestImplementation 'org.mockito:mockito-android:2.18.3'
androidTestImplementation 'tools.fastlane:screengrab:2.1.0'
androidTestImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0'

androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.1.0'
androidTestImplementation "androidx.test.uiautomator:uiautomator:2.2.0"
testImplementation "androidx.test:core-ktx:1.4.0"
implementation 'com.android.support.test.espresso:espresso-idling-resource:3.1.0'
}

tasks.withType(Javadoc).all {
enabled = false
}

publish {
userOrg = 'catrobat'
repoName = 'Paintroid'
groupId = 'org.catrobat.paintroid'
artifactId = 'paintroid'
publishVersion = rootProject.ext.androidVersionName
licences = ['AGPL-V3']
desc = 'A graphical paint editor library for Android'
website = 'https://github.com/Catrobat/Paintroid'
issueTracker = 'https://jira.catrob.at/browse/PAINTROID'
repository = "${website}.git"
}

if (project.hasProperty('jenkins')) {
android.dexOptions.preDexLibraries = false
}
6 changes: 1 addition & 5 deletions Paintroid/config/checkstyle.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
* Paintroid: An image manipulation application for Android.
* Copyright (C) 2010-2015 The Catrobat Team
* Copyright (C) 2010-2022 The Catrobat Team
* (<http://developer.catrobat.org/credits>)
*
* This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -296,8 +296,4 @@
<property name="onCommentFormat" value="@formatter\:on" />
</module>

<module name="SuppressionFilter">
<property name="file" value="Paintroid/config/checkstyle_suppressions.xml" />
</module>

</module>
24 changes: 0 additions & 24 deletions Paintroid/config/checkstyle_suppressions.xml

This file was deleted.

10 changes: 5 additions & 5 deletions Paintroid/config/detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ complexity:
active: false
ignoredLabels: ""
LargeClass:
active: true
threshold: 650
active: false
threshold: 1000
LongMethod:
active: true
threshold: 80
Expand Down Expand Up @@ -203,7 +203,7 @@ formatting:
active: false
autoCorrect: true
Indentation:
active: true
active: false
autoCorrect: true
indentSize: 4
continuationIndentSize: 4
Expand Down Expand Up @@ -253,7 +253,7 @@ formatting:
active: true
autoCorrect: true
ParameterListWrapping:
active: true
active: false
autoCorrect: true
indentSize: 4
SpacingAroundColon:
Expand Down Expand Up @@ -509,7 +509,7 @@ style:
SafeCast:
active: true
SerialVersionUIDInSerializableClass:
active: true
active: false
SpacingBetweenPackageAndImports:
active: true
ThrowsCount:
Expand Down
22 changes: 0 additions & 22 deletions Paintroid/config/lint-baseline.xml

This file was deleted.

Loading

0 comments on commit 6c62260

Please sign in to comment.