mirror of
https://github.com/thunderbird/thunderbird-android.git
synced 2024-09-20 12:12:15 +02:00
Merge pull request #4249 from k9mail/update_build
Update build tools/config
This commit is contained in:
commit
f62615bb57
@ -1,9 +1,6 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'org.jetbrains.kotlin.android'
|
||||
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/checkstyle-android.gradle"
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/findbugs-android.gradle"
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${versions.kotlin}"
|
||||
|
||||
@ -29,8 +26,7 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion buildConfig.minSdk
|
||||
// For Robolectric tests
|
||||
targetSdkVersion 23
|
||||
targetSdkVersion buildConfig.robolectricSdk
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
@ -39,8 +35,8 @@ android {
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
sourceCompatibility javaVersion
|
||||
targetCompatibility javaVersion
|
||||
}
|
||||
|
||||
testOptions {
|
||||
|
@ -2,9 +2,6 @@ apply plugin: 'com.android.library'
|
||||
apply plugin: 'org.jetbrains.kotlin.android'
|
||||
apply plugin: 'org.jetbrains.kotlin.android.extensions'
|
||||
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/checkstyle-android.gradle"
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/findbugs-android.gradle"
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${versions.kotlin}"
|
||||
|
||||
@ -45,8 +42,7 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion buildConfig.minSdk
|
||||
// For Robolectric tests
|
||||
targetSdkVersion 22
|
||||
targetSdkVersion buildConfig.robolectricSdk
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
@ -55,8 +51,8 @@ android {
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
sourceCompatibility javaVersion
|
||||
targetCompatibility javaVersion
|
||||
}
|
||||
|
||||
testOptions {
|
||||
|
@ -1,9 +1,6 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'org.jetbrains.kotlin.android'
|
||||
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/checkstyle-android.gradle"
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/findbugs-android.gradle"
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${versions.kotlin}"
|
||||
|
||||
@ -27,7 +24,7 @@ android {
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
sourceCompatibility javaVersion
|
||||
targetCompatibility javaVersion
|
||||
}
|
||||
}
|
||||
|
@ -2,9 +2,6 @@ apply plugin: 'com.android.application'
|
||||
apply plugin: 'org.jetbrains.kotlin.android'
|
||||
apply plugin: 'org.jetbrains.kotlin.android.extensions'
|
||||
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/checkstyle-android.gradle"
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/findbugs-android.gradle"
|
||||
|
||||
if (rootProject.testCoverage) {
|
||||
apply plugin: 'jacoco'
|
||||
}
|
||||
@ -98,8 +95,8 @@ android {
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
sourceCompatibility javaVersion
|
||||
targetCompatibility javaVersion
|
||||
}
|
||||
|
||||
testOptions {
|
||||
|
@ -1,9 +1,6 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'org.jetbrains.kotlin.android'
|
||||
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/checkstyle-android.gradle"
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/findbugs-android.gradle"
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${versions.kotlin}"
|
||||
|
||||
@ -29,8 +26,7 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion buildConfig.minSdk
|
||||
// For Robolectric tests
|
||||
targetSdkVersion 22
|
||||
targetSdkVersion buildConfig.robolectricSdk
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
@ -39,8 +35,8 @@ android {
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
sourceCompatibility javaVersion
|
||||
targetCompatibility javaVersion
|
||||
}
|
||||
|
||||
testOptions {
|
||||
|
@ -19,8 +19,7 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion buildConfig.minSdk
|
||||
// For Robolectric tests
|
||||
targetSdkVersion 22
|
||||
targetSdkVersion buildConfig.robolectricSdk
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
@ -29,7 +28,7 @@ android {
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
sourceCompatibility javaVersion
|
||||
targetCompatibility javaVersion
|
||||
}
|
||||
}
|
||||
|
@ -2,9 +2,6 @@ apply plugin: 'com.android.library'
|
||||
apply plugin: 'org.jetbrains.kotlin.android'
|
||||
apply plugin: 'org.jetbrains.kotlin.android.extensions'
|
||||
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/checkstyle-android.gradle"
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/findbugs-android.gradle"
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${versions.kotlin}"
|
||||
|
||||
@ -69,8 +66,7 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion buildConfig.minSdk
|
||||
// For Robolectric tests
|
||||
targetSdkVersion 23
|
||||
targetSdkVersion buildConfig.robolectricSdk
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
@ -79,8 +75,8 @@ android {
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
sourceCompatibility javaVersion
|
||||
targetCompatibility javaVersion
|
||||
}
|
||||
|
||||
testOptions {
|
||||
|
@ -5,6 +5,7 @@ import android.database.Cursor
|
||||
import android.database.MatrixCursor
|
||||
import android.text.Spannable
|
||||
import android.text.style.AbsoluteSizeSpan
|
||||
import android.view.ContextThemeWrapper
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.CheckBox
|
||||
@ -50,7 +51,7 @@ private const val SECOND_LINE_DEFAULT_FONT_SIZE = 14f
|
||||
private const val DATE_DEFAULT_FONT_SIZE = 14f
|
||||
|
||||
class MessageListAdapterTest : RobolectricTest() {
|
||||
val context: Context = RuntimeEnvironment.application
|
||||
val context: Context = ContextThemeWrapper(RuntimeEnvironment.application, R.style.Theme_K9_Light)
|
||||
val testAccount = Account(SOME_ACCOUNT_UUID)
|
||||
|
||||
val messageHelper: MessageHelper = mock {
|
||||
|
@ -1,9 +1,6 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'org.jetbrains.kotlin.android'
|
||||
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/checkstyle-android.gradle"
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/findbugs-android.gradle"
|
||||
|
||||
dependencies {
|
||||
api project(":mail:common")
|
||||
|
||||
@ -24,7 +21,7 @@ android {
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
sourceCompatibility javaVersion
|
||||
targetCompatibility javaVersion
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,6 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'org.jetbrains.kotlin.android'
|
||||
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/checkstyle-android.gradle"
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/findbugs-android.gradle"
|
||||
|
||||
if (rootProject.testCoverage) {
|
||||
apply plugin: 'jacoco'
|
||||
}
|
||||
@ -42,7 +39,7 @@ android {
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
sourceCompatibility javaVersion
|
||||
targetCompatibility javaVersion
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,6 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'org.jetbrains.kotlin.android'
|
||||
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/checkstyle-android.gradle"
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/findbugs-android.gradle"
|
||||
|
||||
if (rootProject.testCoverage) {
|
||||
apply plugin: 'jacoco'
|
||||
}
|
||||
@ -42,7 +39,7 @@ android {
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
sourceCompatibility javaVersion
|
||||
targetCompatibility javaVersion
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,6 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'org.jetbrains.kotlin.android'
|
||||
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/checkstyle-android.gradle"
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/findbugs-android.gradle"
|
||||
|
||||
if (rootProject.testCoverage) {
|
||||
apply plugin: 'jacoco'
|
||||
}
|
||||
@ -41,7 +38,7 @@ android {
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
sourceCompatibility javaVersion
|
||||
targetCompatibility javaVersion
|
||||
}
|
||||
}
|
||||
|
11
build.gradle
11
build.gradle
@ -3,11 +3,12 @@ buildscript {
|
||||
buildConfig = [
|
||||
'compileSdk': 28,
|
||||
'minSdk': 19,
|
||||
'buildTools': '28.0.3'
|
||||
'buildTools': '28.0.3',
|
||||
'robolectricSdk': 28
|
||||
]
|
||||
|
||||
versions = [
|
||||
'kotlin': '1.3.20',
|
||||
'kotlin': '1.3.50',
|
||||
'androidxAppCompat': '1.0.2',
|
||||
'androidxRecyclerView': '1.0.0',
|
||||
'androidxLifecycleExtensions': '2.0.0',
|
||||
@ -28,11 +29,13 @@ buildscript {
|
||||
|
||||
'androidxTestRunner': '1.1.1',
|
||||
'junit': '4.12',
|
||||
'robolectric': '3.7.1',
|
||||
'robolectric': '4.2.1',
|
||||
'mockito': '2.18.0',
|
||||
'mockitoKotlin': '1.5.0',
|
||||
'truth': '0.35'
|
||||
]
|
||||
|
||||
javaVersion = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
repositories {
|
||||
@ -42,7 +45,7 @@ buildscript {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.3.2'
|
||||
classpath 'com.android.tools.build:gradle:3.5.2'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
|
||||
classpath "org.jetbrains.kotlin:kotlin-android-extensions:${versions.kotlin}"
|
||||
}
|
||||
|
@ -1,149 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module PUBLIC
|
||||
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
|
||||
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
|
||||
|
||||
<module name="Checker">
|
||||
<!--
|
||||
If you set the basedir property below, then all reported file
|
||||
names will be relative to the specified directory. See
|
||||
http://checkstyle.sourceforge.net/5.x/config.html#Checker
|
||||
|
||||
<property name="basedir" value="${basedir}"/>
|
||||
-->
|
||||
|
||||
<property name="severity" value="info"/>
|
||||
|
||||
<!--
|
||||
<module name="SuppressionFilter">
|
||||
<property name="file" value="${checkstyle.suppressions.file}"/>
|
||||
</module>
|
||||
-->
|
||||
|
||||
<module name="FileTabCharacter">
|
||||
<property name="eachLine" value="false"/>
|
||||
</module>
|
||||
|
||||
<module name="NewlineAtEndOfFile"/>
|
||||
|
||||
<module name="TreeWalker">
|
||||
<property name="tabWidth" value="4"/>
|
||||
|
||||
<module name="AvoidStarImport"/>
|
||||
<module name="ConstantName">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
<module name="EmptyBlock">
|
||||
<property name="option" value="text"/>
|
||||
<property name="tokens" value="LITERAL_CATCH"/>
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
<module name="EmptyForIteratorPad"/>
|
||||
<module name="EqualsHashCode">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
<module name="OneStatementPerLine"/>
|
||||
|
||||
<!-- module name="IllegalCatch"/ -->
|
||||
<module name="IllegalImport">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
<module name="IllegalThrows">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
<module name="InnerAssignment">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="LeftCurly">
|
||||
<property name="option" value="eol"/>
|
||||
</module>
|
||||
|
||||
<module name="LineLength">
|
||||
<property name="max" value="140"/>
|
||||
</module>
|
||||
|
||||
<module name="LocalFinalVariableName">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
<module name="LocalVariableName">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
<module name="MemberName">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
<module name="MethodName">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
<module name="MethodParamPad"/>
|
||||
<module name="ModifierOrder"/>
|
||||
<module name="NeedBraces"/>
|
||||
<module name="NoWhitespaceAfter">
|
||||
<property name="tokens" value="BNOT"/>
|
||||
<property name="tokens" value="DEC"/>
|
||||
<property name="tokens" value="DOT"/>
|
||||
<property name="tokens" value="INC"/>
|
||||
<property name="tokens" value="LNOT"/>
|
||||
<property name="tokens" value="UNARY_MINUS"/>
|
||||
<property name="tokens" value="UNARY_PLUS"/>
|
||||
</module>
|
||||
|
||||
<module name="NoWhitespaceBefore"/>
|
||||
<module name="NoWhitespaceBefore">
|
||||
<property name="tokens" value="DOT"/>
|
||||
<property name="allowLineBreaks" value="true"/>
|
||||
</module>
|
||||
|
||||
<module name="PackageName">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
<module name="ParameterName">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
<module name="ParenPad"/>
|
||||
<module name="TypecastParenPad"/>
|
||||
<module name="RedundantImport"/>
|
||||
<module name="RedundantModifier"/>
|
||||
<module name="RightCurly">
|
||||
<property name="option" value="alone"/>
|
||||
<property name="tokens" value="LITERAL_ELSE"/>
|
||||
</module>
|
||||
<module name="SimplifyBooleanExpression"/>
|
||||
<module name="SimplifyBooleanReturn"/>
|
||||
<module name="TypeName">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
<module name="UnusedImports"/>
|
||||
<module name="UpperEll"/>
|
||||
<module name="WhitespaceAfter"/>
|
||||
<module name="WhitespaceAround"/>
|
||||
<module name="GenericWhitespace"/>
|
||||
|
||||
<!--
|
||||
<module name="MissingSwitchDefault"/>
|
||||
<module name="MagicNumber"/>
|
||||
<module name="Indentation"/>
|
||||
|
||||
<module name="OperatorWrap">
|
||||
<property name="option" value="eol"/>
|
||||
</module>
|
||||
|
||||
<module name="EqualsAvoidNull">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
-->
|
||||
|
||||
<module name="ParameterAssignment">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="DefaultComesLast"/>
|
||||
<module name="MissingDeprecated"/>
|
||||
<module name="MissingOverride">
|
||||
<property name="javaFiveCompatibility" value="true"/>
|
||||
</module>
|
||||
<module name="OuterTypeFilename">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
</module>
|
||||
</module>
|
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<FindBugsFilter>
|
||||
<Match>
|
||||
<Class name="~com\.fsck\.k9\.R.*" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Class name="~android\..*" />
|
||||
</Match>
|
||||
</FindBugsFilter>
|
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<FindBugsFilter>
|
||||
<Match>
|
||||
<Package name="~com\.fsck\.k9.*" />
|
||||
<Not>
|
||||
<Or>
|
||||
<Bug pattern="VA_FORMAT_STRING_USES_NEWLINE" />
|
||||
<Bug pattern="MS_CANNOT_BE_FINAL" />
|
||||
<Bug pattern="SF_SWITCH_NO_DEFAULT" />
|
||||
</Or>
|
||||
</Not>
|
||||
</Match>
|
||||
</FindBugsFilter>
|
@ -1,2 +1,3 @@
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
org.gradle.parallel=true
|
||||
|
@ -1,12 +0,0 @@
|
||||
apply plugin: 'checkstyle'
|
||||
|
||||
check.dependsOn 'checkstyle'
|
||||
task checkstyle(type: Checkstyle) {
|
||||
ignoreFailures = true
|
||||
configFile file("$rootProject.projectDir/config/checkstyle/checkstyle.xml")
|
||||
|
||||
source = project.android.sourceSets.main.java.getSrcDirs() +
|
||||
project.android.sourceSets.androidTest.java.getSrcDirs()
|
||||
include '**/*.java'
|
||||
classpath = files()
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
apply plugin: 'findbugs'
|
||||
|
||||
afterEvaluate {
|
||||
def variants = plugins.hasPlugin('com.android.application') ?
|
||||
android.applicationVariants : android.libraryVariants
|
||||
|
||||
variants.each { variant ->
|
||||
def task = project.task("findBugs${variant.name.capitalize()}", type: FindBugs) {
|
||||
group = 'verification'
|
||||
description = "Run FindBugs for the ${variant.description}."
|
||||
|
||||
effort = 'max'
|
||||
ignoreFailures = true
|
||||
|
||||
includeFilter = file("$rootProject.projectDir/config/findbugs/include_filter.xml")
|
||||
excludeFilter = file("$rootProject.projectDir/config/findbugs/exclude_filter.xml")
|
||||
|
||||
def variantCompile = variant.javaCompile
|
||||
|
||||
classes = fileTree(variantCompile.destinationDir)
|
||||
source = variantCompile.source
|
||||
classpath = variantCompile.classpath.plus(project.files(android.bootClasspath))
|
||||
|
||||
dependsOn(variantCompile)
|
||||
}
|
||||
|
||||
tasks.getByName('check').dependsOn(task)
|
||||
}
|
||||
}
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.3.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
51
gradlew
vendored
51
gradlew
vendored
@ -1,5 +1,21 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# https://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.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
@ -28,7 +44,7 @@ APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
@ -109,8 +125,8 @@ if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
@ -138,19 +154,19 @@ if $cygwin ; then
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
@ -159,14 +175,9 @@ save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=$(save "$@")
|
||||
APP_ARGS=`save "$@"`
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
18
gradlew.bat
vendored
18
gradlew.bat
vendored
@ -1,3 +1,19 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
@ -1,9 +1,6 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'org.jetbrains.kotlin.android'
|
||||
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/checkstyle-android.gradle"
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/findbugs-android.gradle"
|
||||
|
||||
if (rootProject.testCoverage) {
|
||||
apply plugin: 'jacoco'
|
||||
}
|
||||
@ -50,7 +47,7 @@ android {
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
sourceCompatibility javaVersion
|
||||
targetCompatibility javaVersion
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,6 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'org.jetbrains.kotlin.android'
|
||||
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/checkstyle-android.gradle"
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/findbugs-android.gradle"
|
||||
|
||||
if (rootProject.testCoverage) {
|
||||
apply plugin: 'jacoco'
|
||||
}
|
||||
@ -48,7 +45,7 @@ android {
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
sourceCompatibility javaVersion
|
||||
targetCompatibility javaVersion
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,5 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/checkstyle-android.gradle"
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/findbugs-android.gradle"
|
||||
|
||||
if (rootProject.testCoverage) {
|
||||
apply plugin: 'jacoco'
|
||||
}
|
||||
@ -43,7 +40,7 @@ android {
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
sourceCompatibility javaVersion
|
||||
targetCompatibility javaVersion
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,5 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/checkstyle-android.gradle"
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/findbugs-android.gradle"
|
||||
|
||||
if (rootProject.testCoverage) {
|
||||
apply plugin: 'jacoco'
|
||||
}
|
||||
@ -43,7 +40,7 @@ android {
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
sourceCompatibility javaVersion
|
||||
targetCompatibility javaVersion
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,5 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/checkstyle-android.gradle"
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/findbugs-android.gradle"
|
||||
|
||||
if (rootProject.testCoverage) {
|
||||
apply plugin: 'jacoco'
|
||||
}
|
||||
@ -48,7 +45,7 @@ android {
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
sourceCompatibility javaVersion
|
||||
targetCompatibility javaVersion
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,6 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'org.jetbrains.kotlin.android'
|
||||
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/checkstyle-android.gradle"
|
||||
apply from: "${rootProject.projectDir}/gradle/plugins/findbugs-android.gradle"
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${versions.kotlin}"
|
||||
|
||||
@ -27,7 +24,7 @@ android {
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
sourceCompatibility javaVersion
|
||||
targetCompatibility javaVersion
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user