Skip to content

Commit 90db655

Browse files
authored
[1.13.0-rc] Version 1.13.0 (#2504)
2 parents bbd76b1 + a105741 commit 90db655

3,183 files changed

Lines changed: 66829 additions & 63364 deletions

File tree

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 405 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/deploy.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: Deploy
2+
3+
on:
4+
# Called by CI workflow when deployment is needed
5+
workflow_call:
6+
secrets:
7+
SONATYPE_PORTAL_USERNAME:
8+
required: true
9+
SONATYPE_PORTAL_PASSWORD:
10+
required: true
11+
# Allow manual deployment
12+
workflow_dispatch:
13+
inputs:
14+
force_deploy:
15+
description: 'Force deployment even if not on develop or RC branch'
16+
required: false
17+
type: boolean
18+
default: false
19+
20+
concurrency:
21+
group: deploy-${{ github.ref }}
22+
cancel-in-progress: false
23+
24+
env:
25+
GRADLE_OPTS: >-
26+
-Dorg.gradle.daemon=false
27+
-Dorg.gradle.parallel=true
28+
-Dorg.gradle.caching=true
29+
-Dorg.gradle.configuration-cache=true
30+
-Dkotlin.incremental=true
31+
-Dkotlin.compiler.execution.strategy=in-process
32+
33+
jobs:
34+
validate:
35+
name: Validate Deployment
36+
runs-on: ubuntu-latest
37+
outputs:
38+
should_deploy: ${{ steps.check.outputs.should_deploy }}
39+
40+
steps:
41+
- name: Check deployment conditions
42+
id: check
43+
run: |
44+
BRANCH="${{ github.ref_name }}"
45+
46+
# Check if it's a valid branch for deployment
47+
if [[ "$BRANCH" == "develop" ]] || [[ "$BRANCH" =~ -rc$ ]] || [[ "$BRANCH" =~ -RC$ ]]; then
48+
echo "should_deploy=true" >> $GITHUB_OUTPUT
49+
echo "✅ Deployment allowed for branch: $BRANCH"
50+
elif [ "${{ inputs.force_deploy }}" == "true" ]; then
51+
echo "should_deploy=true" >> $GITHUB_OUTPUT
52+
echo "⚠️ Forced deployment for branch: $BRANCH"
53+
else
54+
echo "should_deploy=false" >> $GITHUB_OUTPUT
55+
echo "❌ Deployment skipped: Branch $BRANCH is not develop or RC"
56+
fi
57+
58+
deploy:
59+
name: Deploy to Sonatype
60+
runs-on: ubuntu-latest
61+
needs: validate
62+
if: needs.validate.outputs.should_deploy == 'true'
63+
timeout-minutes: 20
64+
65+
steps:
66+
- name: Checkout code
67+
uses: actions/checkout@v4
68+
with:
69+
fetch-depth: 0
70+
71+
- name: Set up JDK 17
72+
uses: actions/setup-java@v4
73+
with:
74+
java-version: '17'
75+
distribution: 'temurin'
76+
cache: 'gradle'
77+
78+
- name: Make gradlew executable
79+
run: chmod +x ./gradlew
80+
81+
- name: Publish to Sonatype
82+
run: ./gradlew :core:publishToSonatype
83+
env:
84+
NEXUS_USERNAME: ${{ secrets.SONATYPE_PORTAL_USERNAME }}
85+
NEXUS_PASSWORD: ${{ secrets.SONATYPE_PORTAL_PASSWORD }}
86+
87+
- name: Extract version
88+
id: version
89+
run: |
90+
VERSION=$(./gradlew -q printVersion 2>/dev/null || echo "unknown")
91+
echo "version=$VERSION" >> $GITHUB_OUTPUT
92+
93+
- name: Create deployment summary
94+
run: |
95+
echo "## 🚀 Deployment Successful" >> $GITHUB_STEP_SUMMARY
96+
echo "" >> $GITHUB_STEP_SUMMARY
97+
echo "**Branch:** ${{ github.ref_name }}" >> $GITHUB_STEP_SUMMARY
98+
echo "**Version:** ${{ steps.version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
99+
echo "**Commit:** ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY
100+
echo "" >> $GITHUB_STEP_SUMMARY
101+
echo "Published to Sonatype Nexus" >> $GITHUB_STEP_SUMMARY
102+

.idea/gradle.xml

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Jenkinsfile

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# DHIS2 Android SDK
22

3-
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.hisp.dhis/android-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.hisp.dhis/android-core)
3+
[![Maven Central](https://img.shields.io/maven-central/v/org.hisp.dhis/android-core?label=maven%20central)](https://central.sonatype.com/artifact/org.hisp.dhis/android-core)
44
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=dhis2_dhis2-android-sdk&metric=coverage&branch=master)](https://sonarcloud.io/summary/new_code?id=dhis2_dhis2-android-sdk&branch=master)
55
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=dhis2_dhis2-android-sdk&metric=ncloc&branch=master)](https://sonarcloud.io/summary/new_code?id=dhis2_dhis2-android-sdk&branch=master)
66
[![KDoc link](https://img.shields.io/badge/API_reference-KDoc-blue)](https://dhis2.github.io/dhis2-android-sdk/api/)

annotations/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

annotations/build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
plugins {
2+
kotlin("jvm")
3+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Copyright (c) 2004-2025, University of Oslo
3+
* All rights reserved.
4+
*
5+
* Redistribution and use in source and binary forms, with or without
6+
* modification, are permitted provided that the following conditions are met:
7+
* Redistributions of source code must retain the above copyright notice, this
8+
* list of conditions and the following disclaimer.
9+
*
10+
* Redistributions in binary form must reproduce the above copyright notice,
11+
* this list of conditions and the following disclaimer in the documentation
12+
* and/or other materials provided with the distribution.
13+
* Neither the name of the HISP project nor the names of its contributors may
14+
* be used to endorse or promote products derived from this software without
15+
* specific prior written permission.
16+
*
17+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
21+
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27+
*/
28+
29+
package org.hisp.dhis.android.processor
30+
31+
@Target(AnnotationTarget.CLASS)
32+
@Retention(AnnotationRetention.SOURCE)
33+
annotation class GenerateDaoQueries(val tableName: String, val parentColumnName: String = "")

build.gradle.kts

Lines changed: 50 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import org.jlleitschuh.gradle.ktlint.reporter.ReporterType
2+
import org.jetbrains.kotlin.gradle.dsl.*
3+
import com.android.build.api.dsl.*
24

35
group = "org.hisp.dhis"
46
version = libs.versions.dhis2AndroidSdkVersion.get()
@@ -27,33 +29,11 @@ buildscript {
2729
}
2830

2931
plugins {
30-
alias(libs.plugins.sonarqube)
3132
alias(libs.plugins.dokka)
3233
alias(libs.plugins.nexus.publish)
3334
alias(libs.plugins.cyclonedx)
3435
}
3536

36-
sonarqube {
37-
properties {
38-
val branch = System.getenv("GIT_BRANCH")
39-
val targetBranch = System.getenv("GIT_BRANCH_DEST")
40-
val pullRequestId = System.getenv("PULL_REQUEST")
41-
42-
property("sonar.projectKey", "dhis2_dhis2-android-sdk")
43-
property("sonar.organization", "dhis2")
44-
property("sonar.host.url", "https://sonarcloud.io")
45-
property("sonar.projectName", "dhis2-android-sdk")
46-
47-
if (pullRequestId == null) {
48-
property("sonar.branch.name", branch)
49-
} else {
50-
property("sonar.pullrequest.base", targetBranch)
51-
property("sonar.pullrequest.branch", branch)
52-
property("sonar.pullrequest.key", pullRequestId)
53-
}
54-
}
55-
}
56-
5737
allprojects {
5838
repositories {
5939
mavenCentral()
@@ -66,6 +46,54 @@ allprojects {
6646

6747
apply(from = "tasks.gradle.kts")
6848

49+
val jvmVersion = libs.versions.java.get().toInt()
50+
51+
plugins.withType<JavaPlugin> {
52+
extensions.configure<JavaPluginExtension> {
53+
toolchain { languageVersion.set(JavaLanguageVersion.of(jvmVersion)) }
54+
}
55+
}
56+
57+
subprojects {
58+
// Kotlin JVM pure
59+
plugins.withId("org.jetbrains.kotlin.jvm") {
60+
extensions.configure<KotlinJvmProjectExtension> {
61+
jvmToolchain(jvmVersion)
62+
compilerOptions {
63+
jvmTarget.set(JvmTarget.fromTarget(jvmVersion.toString()))
64+
}
65+
}
66+
}
67+
68+
// Kotlin Android
69+
plugins.withId("org.jetbrains.kotlin.android") {
70+
extensions.configure<KotlinAndroidProjectExtension> {
71+
jvmToolchain(jvmVersion)
72+
compilerOptions {
73+
jvmTarget.set(JvmTarget.fromTarget(jvmVersion.toString()))
74+
}
75+
}
76+
}
77+
78+
// Android (app / library)
79+
plugins.withId("com.android.application") {
80+
extensions.configure<ApplicationExtension> {
81+
compileOptions {
82+
sourceCompatibility = JavaVersion.toVersion(jvmVersion)
83+
targetCompatibility = JavaVersion.toVersion(jvmVersion)
84+
}
85+
}
86+
}
87+
plugins.withId("com.android.library") {
88+
extensions.configure<LibraryExtension> {
89+
compileOptions {
90+
sourceCompatibility = JavaVersion.toVersion(jvmVersion)
91+
targetCompatibility = JavaVersion.toVersion(jvmVersion)
92+
}
93+
}
94+
}
95+
}
96+
6997
subprojects {
7098
apply(plugin = "org.jlleitschuh.gradle.ktlint")
7199
apply(plugin = "org.jetbrains.dokka")

0 commit comments

Comments
 (0)