mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-15 11:40:30 +03:00
import: make it work most of the time with git repos
This includes real tests too.
This commit is contained in:
parent
e049a120f8
commit
bfe587979d
28 changed files with 1184 additions and 42 deletions
76
tests/source-files/com.anpmech.launcher/app/build.gradle
Normal file
76
tests/source-files/com.anpmech.launcher/app/build.gradle
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* Copyright 2015-2017 Hayai Software
|
||||
* Copyright 2018 The KeikaiLauncher Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
||||
* in compliance with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed under the
|
||||
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND
|
||||
* either express or implied. See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'pl.allegro.tech.build.axion-release' version '1.8.1'
|
||||
}
|
||||
|
||||
scmVersion {
|
||||
tag {
|
||||
prefix = ''
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Takes version {@code major.minor.patch[-suffix]} and returns numeric versionCode based on it
|
||||
* Example: {@code 1.2.3-SNAPSHOT} will return {@code 1002003}
|
||||
*/
|
||||
static int versionCode(String versionName) {
|
||||
def matcher = (versionName =~ /(\d+)\.(\d+)\.(\d+).*/)
|
||||
return matcher.matches() ?
|
||||
matcher.collect { version, major, minor, patch ->
|
||||
major.toInteger() * 10000 + minor.toInteger() * 100 + patch.toInteger()
|
||||
}.head() :
|
||||
-1
|
||||
}
|
||||
|
||||
def androidVersion = [
|
||||
name: scmVersion.version,
|
||||
code: versionCode(scmVersion.version),
|
||||
]
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
defaultConfig {
|
||||
applicationId 'com.anpmech.launcher'
|
||||
minSdkVersion 15
|
||||
targetSdkVersion 28
|
||||
versionName androidVersion.name
|
||||
versionCode androidVersion.code
|
||||
}
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
buildTypes {
|
||||
all {
|
||||
buildConfigField("String", "GITHUB_USER", "\"KeikaiLauncher\"")
|
||||
buildConfigField("String", "GITHUB_PROJECT", "\"KeikaiLauncher\"")
|
||||
}
|
||||
release {
|
||||
minifyEnabled true
|
||||
shrinkResources true
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.txt'
|
||||
}
|
||||
debug {
|
||||
versionNameSuffix "-debug"
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
implementation 'com.android.support:support-annotations:28.0.0'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue