Replaced Git Submodules by Include Core Build Gradle Plugin.
This commit is contained in:
parent
544863df88
commit
5c33730239
|
@ -4,10 +4,6 @@ before_script:
|
||||||
- export GRADLE_USER_HOME=`pwd`/.gradle
|
- export GRADLE_USER_HOME=`pwd`/.gradle
|
||||||
- export VERSION_NAME=$(grep -E "versionName " buildSrc/src/main/kotlin/ProtonMail.kt | awk '{print $5}' | sed s/\"//g)
|
- export VERSION_NAME=$(grep -E "versionName " buildSrc/src/main/kotlin/ProtonMail.kt | awk '{print $5}' | sed s/\"//g)
|
||||||
- export VERSION_CODE=$(grep -E "versionCode " buildSrc/src/main/kotlin/ProtonMail.kt | awk '{print $5}' | sed s/\"//g)
|
- export VERSION_CODE=$(grep -E "versionCode " buildSrc/src/main/kotlin/ProtonMail.kt | awk '{print $5}' | sed s/\"//g)
|
||||||
- !reference [.checkout-core-submodule, before_script] # included from checkout-core.gitlab-ci.yml
|
|
||||||
|
|
||||||
variables:
|
|
||||||
ORG_GRADLE_PROJECT_useCoreGitSubmodule: "true" # see included checkout-core.gitlab-ci.yml for usage context
|
|
||||||
|
|
||||||
image: ${CI_REGISTRY}/android/shared/docker-android:v1.0.0
|
image: ${CI_REGISTRY}/android/shared/docker-android:v1.0.0
|
||||||
|
|
||||||
|
@ -31,7 +27,6 @@ stages:
|
||||||
|
|
||||||
detekt analysis:
|
detekt analysis:
|
||||||
stage: analyze
|
stage: analyze
|
||||||
extends: .checkout_core_submodule_job
|
|
||||||
tags:
|
tags:
|
||||||
- large
|
- large
|
||||||
except:
|
except:
|
||||||
|
@ -47,7 +42,6 @@ detekt analysis:
|
||||||
|
|
||||||
build debug:
|
build debug:
|
||||||
stage: build
|
stage: build
|
||||||
extends: .checkout_core_submodule_job
|
|
||||||
tags:
|
tags:
|
||||||
- xlarge-k8s
|
- xlarge-k8s
|
||||||
script:
|
script:
|
||||||
|
@ -60,7 +54,6 @@ build debug:
|
||||||
|
|
||||||
build uiAutomation:
|
build uiAutomation:
|
||||||
stage: build
|
stage: build
|
||||||
extends: .checkout_core_submodule_job
|
|
||||||
tags:
|
tags:
|
||||||
- xlarge-k8s
|
- xlarge-k8s
|
||||||
script:
|
script:
|
||||||
|
@ -73,7 +66,6 @@ build uiAutomation:
|
||||||
|
|
||||||
build alpha:
|
build alpha:
|
||||||
stage: build
|
stage: build
|
||||||
extends: .checkout_core_submodule_job
|
|
||||||
when: 'manual'
|
when: 'manual'
|
||||||
only:
|
only:
|
||||||
- develop
|
- develop
|
||||||
|
@ -89,7 +81,6 @@ build alpha:
|
||||||
|
|
||||||
build release:
|
build release:
|
||||||
stage: build
|
stage: build
|
||||||
extends: .checkout_core_submodule_job
|
|
||||||
except:
|
except:
|
||||||
- schedules
|
- schedules
|
||||||
only:
|
only:
|
||||||
|
@ -108,7 +99,6 @@ build release:
|
||||||
|
|
||||||
unit tests:
|
unit tests:
|
||||||
stage: test
|
stage: test
|
||||||
extends: .checkout_core_submodule_job
|
|
||||||
tags:
|
tags:
|
||||||
- xlarge-k8s
|
- xlarge-k8s
|
||||||
script:
|
script:
|
||||||
|
@ -232,11 +222,6 @@ include:
|
||||||
ref: main
|
ref: main
|
||||||
file: '/ci/templates-shared/appetize-integration.yml'
|
file: '/ci/templates-shared/appetize-integration.yml'
|
||||||
|
|
||||||
- project: 'proton/mobile/android/proton-libs'
|
|
||||||
ref: main
|
|
||||||
file: '/ci/templates/checkout-core.gitlab-ci.yml'
|
|
||||||
|
|
||||||
|
|
||||||
startReview:
|
startReview:
|
||||||
before_script:
|
before_script:
|
||||||
- export VERSION_NAME=$(grep -E "versionName " buildSrc/src/main/kotlin/ProtonMail.kt | awk '{print $5}' | sed s/\"//g)
|
- export VERSION_NAME=$(grep -E "versionName " buildSrc/src/main/kotlin/ProtonMail.kt | awk '{print $5}' | sed s/\"//g)
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
[submodule "proton-libs"]
|
|
||||||
path = proton-libs
|
|
||||||
url = ../../../proton/mobile/android/proton-libs
|
|
|
@ -21,7 +21,7 @@
|
||||||
dependencies {
|
dependencies {
|
||||||
// region libs
|
// region libs
|
||||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||||
implementation project(':gopenpgp')
|
implementation(files("../../proton-libs/gopenpgp/gopenpgp.aar"))
|
||||||
implementation files('libs/commons-email-1.3.jar')
|
implementation files('libs/commons-email-1.3.jar')
|
||||||
implementation files('libs/mail.jar')
|
implementation files('libs/mail.jar')
|
||||||
implementation files('libs/mail-additional.jar')
|
implementation files('libs/mail-additional.jar')
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
{
|
|
||||||
"go_version":"1.17.8",
|
|
||||||
"build_dir":"build",
|
|
||||||
"out_dir":"out",
|
|
||||||
"go_mobile_dir":"mobile",
|
|
||||||
"go_mobile_flags": [
|
|
||||||
"-x",
|
|
||||||
"-ldflags=\"-s -w \""
|
|
||||||
],
|
|
||||||
"build_name":"gopenpgp",
|
|
||||||
"commit_message": "Build for gopenpgp v2.4.6 and go-srp v0.0.3",
|
|
||||||
"upload_branch": "update-2.4.6+0.0.3",
|
|
||||||
"java_pkg":"com.proton.gopenpgp",
|
|
||||||
"targets":["android"],
|
|
||||||
"requirements": [
|
|
||||||
{
|
|
||||||
"module":
|
|
||||||
{
|
|
||||||
"path":"github.com/ProtonMail/gopenpgp/v2",
|
|
||||||
"version":"v2.4.6"
|
|
||||||
},
|
|
||||||
"packages": ["crypto", "armor", "constants", "models", "subtle", "helper"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"module":{
|
|
||||||
"path":"github.com/ProtonMail/go-srp",
|
|
||||||
"version": "v0.0.3"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,21 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2022 Proton AG
|
|
||||||
*
|
|
||||||
* This file is part of Proton Mail.
|
|
||||||
*
|
|
||||||
* Proton Mail is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Proton Mail is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Proton Mail. If not, see https://www.gnu.org/licenses/.
|
|
||||||
*/
|
|
||||||
|
|
||||||
configurations.maybeCreate("default")
|
|
||||||
artifacts.add("default", file('gopenpgp.aar'))
|
|
Binary file not shown.
Binary file not shown.
|
@ -49,5 +49,7 @@ org.aspectj.weaver.Dump.exception=false
|
||||||
# https://github.com/bcgit/bc-java/issues/762
|
# https://github.com/bcgit/bc-java/issues/762
|
||||||
android.jetifier.ignorelist=bcprov-jdk15on
|
android.jetifier.ignorelist=bcprov-jdk15on
|
||||||
|
|
||||||
# By default use core libs from Git Submodule.
|
# IncludeGit Gradle Plugin: override include with local.
|
||||||
useCoreGitSubmodule=false
|
#auto.include.git.dirs=../
|
||||||
|
#local.git.proton-libs=../proton-libs
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit f09138ec2e95655d31072369d4319142be948b82
|
|
|
@ -19,28 +19,6 @@
|
||||||
|
|
||||||
rootProject.name = "ProtonMail"
|
rootProject.name = "ProtonMail"
|
||||||
|
|
||||||
|
|
||||||
val (projects, modules) = rootDir.projectsAndModules()
|
|
||||||
|
|
||||||
println("Projects: ${projects.sorted().joinToString()}")
|
|
||||||
println("Modules: ${modules.sorted().joinToString()}")
|
|
||||||
|
|
||||||
for (p in projects) includeBuild(p)
|
|
||||||
for (m in modules) include(m)
|
|
||||||
|
|
||||||
// Use core libs from maven artifacts or from git submodule using Gradle's included build:
|
|
||||||
// - to enable/disable locally: gradle.properties > useCoreGitSubmodule
|
|
||||||
// - to enable/disable on CI: .gitlab-ci.yml > ORG_GRADLE_PROJECT_useCoreGitSubmodule
|
|
||||||
val coreSubmoduleDir = rootDir.resolve("proton-libs")
|
|
||||||
extra.set("coreSubmoduleDir", coreSubmoduleDir)
|
|
||||||
val includeCoreLibsHelper = File(coreSubmoduleDir, "gradle/include-core-libs.gradle.kts")
|
|
||||||
if (includeCoreLibsHelper.exists()) {
|
|
||||||
apply(from = "${coreSubmoduleDir.path}/gradle/include-core-libs.gradle.kts")
|
|
||||||
} else if (extensions.extraProperties["useCoreGitSubmodule"].toString().toBoolean()) {
|
|
||||||
includeBuild("proton-libs")
|
|
||||||
println("Core libs from git submodule `$coreSubmoduleDir`")
|
|
||||||
}
|
|
||||||
|
|
||||||
pluginManagement {
|
pluginManagement {
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
@ -50,6 +28,22 @@ pluginManagement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("me.proton.core.gradle-plugins.include-core-build") version "1.1.1"
|
||||||
|
}
|
||||||
|
|
||||||
|
includeCoreBuild {
|
||||||
|
branch.set("main")
|
||||||
|
includeBuild("gopenpgp")
|
||||||
|
}
|
||||||
|
|
||||||
|
val (projects, modules) = rootDir.projectsAndModules()
|
||||||
|
|
||||||
|
println("Projects: ${projects.sorted().joinToString()}")
|
||||||
|
println("Modules: ${modules.sorted().joinToString()}")
|
||||||
|
|
||||||
|
for (p in projects) includeBuild(p)
|
||||||
|
for (m in modules) include(m)
|
||||||
|
|
||||||
fun File.projectsAndModules() : Pair<Set<String>, Set<String>> {
|
fun File.projectsAndModules() : Pair<Set<String>, Set<String>> {
|
||||||
val blacklist = setOf(
|
val blacklist = setOf(
|
||||||
|
|
Loading…
Reference in New Issue