Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ jobs:
{
echo "org.gradle.jvmargs=-Xmx5g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g"
echo "org.gradle.configureondemand=true"
echo "org.gradle.configuration-cache=false"
echo "kapt.incremental.apt=true"
} > "$HOME/.gradle/gradle.properties"
scripts/analysis/analysis-wrapper.sh "${{ steps.get-vars.outputs.branch }}" "${{ secrets.LOG_USERNAME }}" "${{ secrets.LOG_PASSWORD }}" "$GITHUB_RUN_NUMBER" "${{ steps.get-vars.outputs.pr }}"
4 changes: 2 additions & 2 deletions .github/workflows/qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ jobs:
mkdir -p "$HOME/.gradle"
echo "org.gradle.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g" > "$HOME/.gradle/gradle.properties"
echo "org.gradle.caching=true; org.gradle.parallel=true; org.gradle.configureondemand=true; kapt.incremental.apt=true" >> "$HOME/.gradle/gradle.properties"
sed -i "/qa/,/\}/ s/versionCode .*/versionCode ${{github.event.number}} /" "app/build.gradle"
sed -i "/qa/,/\}/ s/versionName .*/versionName \"${{github.event.number}}\"/" "app/build.gradle"
sed -i "/qa/,/\}/ s/versionCode.*/versionCode = ${{ github.event.number }}/" app/build.gradle.kts
sed -i "/qa/,/\}/ s/versionName.*/versionName = \"${{ github.event.number }}\"/" app/build.gradle.kts
./gradlew assembleQaDebug
$(find /usr/local/lib/android/sdk/build-tools/*/apksigner | sort | tail -n1) sign --ks-pass pass:"$KS_PASS" --key-pass pass:"$KEY_PASS" --ks-key-alias key0 --ks ".github/workflows/QA_keystore.jks" app/build/outputs/apk/qa/debug/*qa-debug*.apk
.github/workflows/uploadArtifact.sh "$LOG_USERNAME" "$LOG_PASSWORD" "${{github.event.number}}" "${{github.event.number}}" "$GITHUB_TOKEN"
25 changes: 13 additions & 12 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -297,18 +297,19 @@ tasks.withType<SpotBugsTask>().configureEach {
val variantName = variantNameCap.substring(0, 1).lowercase() + variantNameCap.substring(1)
dependsOn("compile${variantNameCap}Sources")

classes =
fileTree(layout.buildDirectory.get().asFile.toString() + "/intermediates/javac/${variantName}/compile${variantNameCap}JavaWithJavac/classes/")
excludeFilter = file("${project.rootDir}/scripts/analysis/spotbugs-filter.xml")
reports {
register("xml") {
required = true
}
register("html") {
required = true
outputLocation = layout.buildDirectory.file("reports/spotbugs/spotbugs.html").get().asFile
setStylesheet("fancy.xsl")
}
classes = fileTree(
layout.buildDirectory.get().asFile.toString() +
"/intermediates/javac/${variantName}/compile${variantNameCap}JavaWithJavac/classes/"
)
excludeFilter.set(file("${project.rootDir}/scripts/analysis/spotbugs-filter.xml"))

reports.create("xml") {
required.set(true)
}
reports.create("html") {
required.set(true)
outputLocation.set(layout.buildDirectory.file("reports/spotbugs/spotbugs.html"))
setStylesheet("fancy.xsl")
}
}

Expand Down
2 changes: 1 addition & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ end

desc "compute version"
private_lane :androidVersion do
File.open("../app/build.gradle","r") do |f|
File.open("../app/build.gradle.kts","r") do |f|
text = f.read

# everything between Document and Authors
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ glide = "5.0.5"
gsonVersion = "2.13.2"
ical4jVersion = "3.2.19"
jackrabbitWebdavVersion = "2.13.5"
jacoco = "0.8.13"
jacoco = "0.8.14"
jsonVersion = "20250517"
junit = "4.13.2"
junitVersion = "1.3.0"
Expand Down
8 changes: 8 additions & 0 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18063,6 +18063,14 @@
<sha256 value="d7c4c3c4f9458f2de9a63ebac3c80e99c04e358c4aef347c499b52690d761c86" origin="Generated by Gradle" reason="Artifact is not signed"/>
</artifact>
</component>
<component group="com.github.nextcloud" name="android-library" version="d753870f0ae721d8931c113890610e044296f2dd">
<artifact name="android-library-d753870f0ae721d8931c113890610e044296f2dd.aar">
<sha256 value="8123aaea5d9c2fa439a635bb64d16ec532c596a4a2dd76e18da2fe729ab886ba" origin="Generated by Gradle" reason="Artifact is not signed"/>
</artifact>
<artifact name="android-library-d753870f0ae721d8931c113890610e044296f2dd.module">
<sha256 value="68ab5b4fd0dfa9a4c70301b320c6fa2ab61ebf0623740f399088b559715398cc" origin="Generated by Gradle" reason="Artifact is not signed"/>
</artifact>
</component>
<component group="com.github.nextcloud" name="android-library" version="d862794d794a7e8d8b53da98aa801753e684bf52">
<artifact name="android-library-d862794d794a7e8d8b53da98aa801753e684bf52.aar">
<sha256 value="d82be01cadecc9c51d68ed1ef50b98cf19266bdf1c1f781a696b958d94fc4184" origin="Generated by Gradle" reason="Artifact is not signed"/>
Expand Down
18 changes: 13 additions & 5 deletions scripts/analysis/detectWrongSettings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@

snapshotCount=$(./gradlew dependencies | grep SNAPSHOT -c)
betaCount=$(grep "<bool name=\"is_beta\">true</bool>" app/src/main/res/values/setup.xml -c)
libraryHash=$(grep androidLibraryVersion build.gradle | cut -d= -f2 | tr -d \")

# Read androidLibraryVersion from TOML
libraryHash=$(grep 'androidLibraryVersion' gradle/libs.versions.toml \
| cut -d '=' -f2 \
| tr -d ' "' )

baseBranch="master"
lastHashes=$(curl "https://api.github.com/repos/nextcloud/android-library/commits?sha=$baseBranch" | jq ".[] .sha" | head -n 20)

if [[ $(echo "$lastHashes" | grep -c $libraryHash) -ne 1 ]]; then
# Fetch last 10 commit SHAs from GitHub, without quotes
lastHashes=$(curl -s "https://api.github.com/repos/nextcloud/android-library/commits?sha=$baseBranch" \
| jq -r '.[].sha' | head -n 10)

# Check if libraryHash is in lastHashes
if ! echo "$lastHashes" | grep -q "^$libraryHash$"; then
echo "Library commit not within last 10 hashes, please rebase!"
exit 1
fi
Expand All @@ -20,10 +28,10 @@ if [[ $snapshotCount -gt 0 ]] ; then
echo "Snapshot found in dependencies"
exit 1
fi

if [[ $betaCount -gt 0 ]] ; then
echo "Beta is set in setup.xml"
exit 1
fi

exit 0

exit 0
2 changes: 1 addition & 1 deletion scripts/checkIfRunDrone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if [ -z "$PR_NUMBER" ] ; then
fi

export BRANCH=$(scripts/analysis/getBranchBase.sh "$PR_NUMBER" | sed 's/"//g')
if [ "$(git diff --name-only "origin/$BRANCH" | grep -cE "^app/src|screenshots|build.gradle|.drone.yml|gradle")" -eq 0 ] ; then
if [ "$(git diff --name-only "origin/$BRANCH" | grep -cE "^app/src|screenshots|build.gradle.kts|.drone.yml|gradle")" -eq 0 ] ; then
echo "No source files changed"
exit 1
else
Expand Down
Loading