Loading .gitlab-ci.yml +23 −5 Original line number Original line Diff line number Diff line image: "registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:1263-Add_java_17_support" image: "registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:master" stages: stages: - lib - build - publish before_script: before_script: - export GRADLE_USER_HOME=$(pwd)/.gradle - export GRADLE_USER_HOME=$(pwd)/.gradle Loading @@ -12,10 +13,27 @@ cache: paths: paths: - .gradle/ - .gradle/ lib: build: stage: lib stage: build rules: - if: '$CI_COMMIT_TAG !~ "/^$/"' when: always - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' when: manual script: script: - ./gradlew :ical4android:assembleRelease - ./gradlew build artifacts: artifacts: paths: paths: - lib/build/outputs/aar/ - lib/build/outputs/aar/ publish: stage: publish needs: - build rules: - if: '$CI_COMMIT_TAG !~ "/^$/"' when: always - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' when: manual script: - ./gradlew publish gradle.properties +1 −1 Original line number Original line Diff line number Diff line Loading @@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx4g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 org.gradle.parallel=true org.gradle.parallel=true # configuration cache [https://developer.android.com/build/optimize-your-build#use-the-configuration-cache-experimental] # configuration cache [https://developer.android.com/build/optimize-your-build#use-the-configuration-cache-experimental] org.gradle.unsafe.configuration-cache=true org.gradle.unsafe.configuration-cache=false org.gradle.unsafe.configuration-cache-problems=warn org.gradle.unsafe.configuration-cache-problems=warn # Android # Android Loading lib/build.gradle.kts +38 −5 Original line number Original line Diff line number Diff line Loading @@ -9,8 +9,16 @@ plugins { id("org.jetbrains.dokka") id("org.jetbrains.dokka") } } val version_ical4j = "3.2.11" val version_ical4j = "3.2.11" val versionMajor = 1 val versionMinor = 1 val versionPatch = 1 val versionName = "${versionMajor}.${versionMinor}.${versionPatch}" val baseName = "ical4android-$versionName" android { android { compileSdk = 33 compileSdk = 33 Loading @@ -26,6 +34,8 @@ android { aarMetadata { aarMetadata { minCompileSdk = 29 minCompileSdk = 29 } } setProperty("archivesBaseName", baseName) } } compileOptions { compileOptions { Loading Loading @@ -71,13 +81,36 @@ android { publishing { publishing { // Configure publishing data // Configure publishing data publications { publications { register("release", MavenPublication::class.java) { create<MavenPublication>("maven") { groupId = "com.github.bitfireAT" groupId = "foundation.e.lib" artifactId = "ical4android" artifactId = "ical4android" version = System.getenv("GIT_COMMIT") version = versionName artifact("$buildDir/outputs/aar/$baseName-release.aar") afterEvaluate { pom.withXml { from(components["release"]) val dependenciesNode = asNode().appendNode("dependencies") configurations["implementation"].dependencies.forEach { dependency -> if (dependency.name != "unspecified") { val dependencyNode = dependenciesNode.appendNode("dependency") dependencyNode.appendNode("groupId", dependency.group) dependencyNode.appendNode("artifactId", dependency.name) dependencyNode.appendNode("version", dependency.version) } } } repositories { maven { url = uri("https://gitlab.e.foundation/api/v4/projects/97/packages/maven") name = "GitLab" credentials(HttpHeaderCredentials::class) { name = "Job-Token" value = System.getenv("CI_JOB_TOKEN") } authentication { create("header", HttpHeaderAuthentication::class) } } } } } } } } Loading Loading
.gitlab-ci.yml +23 −5 Original line number Original line Diff line number Diff line image: "registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:1263-Add_java_17_support" image: "registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:master" stages: stages: - lib - build - publish before_script: before_script: - export GRADLE_USER_HOME=$(pwd)/.gradle - export GRADLE_USER_HOME=$(pwd)/.gradle Loading @@ -12,10 +13,27 @@ cache: paths: paths: - .gradle/ - .gradle/ lib: build: stage: lib stage: build rules: - if: '$CI_COMMIT_TAG !~ "/^$/"' when: always - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' when: manual script: script: - ./gradlew :ical4android:assembleRelease - ./gradlew build artifacts: artifacts: paths: paths: - lib/build/outputs/aar/ - lib/build/outputs/aar/ publish: stage: publish needs: - build rules: - if: '$CI_COMMIT_TAG !~ "/^$/"' when: always - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' when: manual script: - ./gradlew publish
gradle.properties +1 −1 Original line number Original line Diff line number Diff line Loading @@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx4g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 org.gradle.parallel=true org.gradle.parallel=true # configuration cache [https://developer.android.com/build/optimize-your-build#use-the-configuration-cache-experimental] # configuration cache [https://developer.android.com/build/optimize-your-build#use-the-configuration-cache-experimental] org.gradle.unsafe.configuration-cache=true org.gradle.unsafe.configuration-cache=false org.gradle.unsafe.configuration-cache-problems=warn org.gradle.unsafe.configuration-cache-problems=warn # Android # Android Loading
lib/build.gradle.kts +38 −5 Original line number Original line Diff line number Diff line Loading @@ -9,8 +9,16 @@ plugins { id("org.jetbrains.dokka") id("org.jetbrains.dokka") } } val version_ical4j = "3.2.11" val version_ical4j = "3.2.11" val versionMajor = 1 val versionMinor = 1 val versionPatch = 1 val versionName = "${versionMajor}.${versionMinor}.${versionPatch}" val baseName = "ical4android-$versionName" android { android { compileSdk = 33 compileSdk = 33 Loading @@ -26,6 +34,8 @@ android { aarMetadata { aarMetadata { minCompileSdk = 29 minCompileSdk = 29 } } setProperty("archivesBaseName", baseName) } } compileOptions { compileOptions { Loading Loading @@ -71,13 +81,36 @@ android { publishing { publishing { // Configure publishing data // Configure publishing data publications { publications { register("release", MavenPublication::class.java) { create<MavenPublication>("maven") { groupId = "com.github.bitfireAT" groupId = "foundation.e.lib" artifactId = "ical4android" artifactId = "ical4android" version = System.getenv("GIT_COMMIT") version = versionName artifact("$buildDir/outputs/aar/$baseName-release.aar") afterEvaluate { pom.withXml { from(components["release"]) val dependenciesNode = asNode().appendNode("dependencies") configurations["implementation"].dependencies.forEach { dependency -> if (dependency.name != "unspecified") { val dependencyNode = dependenciesNode.appendNode("dependency") dependencyNode.appendNode("groupId", dependency.group) dependencyNode.appendNode("artifactId", dependency.name) dependencyNode.appendNode("version", dependency.version) } } } repositories { maven { url = uri("https://gitlab.e.foundation/api/v4/projects/97/packages/maven") name = "GitLab" credentials(HttpHeaderCredentials::class) { name = "Job-Token" value = System.getenv("CI_JOB_TOKEN") } authentication { create("header", HttpHeaderAuthentication::class) } } } } } } } } Loading