1
0
Fork 0

Fix buildSrc dependencies and androidX usages

master
Colin Lee 2019-01-07 15:47:47 -06:00
parent 393829e2aa
commit 6449a7b798
6 changed files with 37 additions and 11 deletions

View File

@ -26,6 +26,11 @@ android {
arm { dimension "abi" }
x86 { dimension "abi" }
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
android.applicationVariants.all { variant ->

View File

@ -1,7 +1,7 @@
package org.mozilla.fenix
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
class HomeActivity : AppCompatActivity() {

View File

@ -1,14 +1,13 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.2.71'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath Deps.tools_androidgradle
classpath Deps.tools_kotlingradle
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
@ -18,10 +17,13 @@ buildscript {
allprojects {
repositories {
google()
maven {
url "https://maven.mozilla.org/maven2"
}
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
}

View File

@ -0,0 +1,11 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
plugins {
`kotlin-dsl`
}
repositories {
jcenter()
}

View File

@ -1,25 +1,31 @@
object Versions {
const val kotlin = "1.3.10"
const val coroutines = "1.0.1"
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
private object Versions {
const val kotlin = "1.3.11"
const val android_gradle_plugin = "3.2.1"
const val geckoNightly = "66.0.20181217093726"
const val androidx_appcompat = "1.0.2"
const val androidx_constraintlayout = "1.1.3"
const val androidx_constraint_layout = "1.1.3"
const val junit = "4.12"
const val test_tools = "1.0.2"
const val espresso_core = "2.2.2"
}
@Suppress("unused")
object Deps {
const val tools_androidgradle = "com.android.tools.build:gradle:${Versions.android_gradle_plugin}"
const val tools_kotlingradle = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}"
const val kotlin_stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${Versions.kotlin}"
const val kotlin_coroutines = "org.jetbrains.kotlinx:kotlinx-coroutines-android:${Versions.coroutines}"
const val geckoview_nightly_arm = "org.mozilla.geckoview:geckoview-nightly-armeabi-v7a:${Versions.geckoNightly}"
const val geckoview_nightly_x86 = "org.mozilla.geckoview:geckoview-nightly-x86:${Versions.geckoNightly}"
const val androidx_appcompat = "androidx.appcompat:appcompat:${Versions.androidx_appcompat}"
const val androidx_constraintlayout = "androidx.constraintlayout:constraintlayout:${Versions.androidx_constraintlayout}"
const val androidx_constraintlayout = "androidx.constraintlayout:constraintlayout:${Versions.androidx_constraint_layout}"
const val junit = "junit:junit:${Versions.junit}"
const val tools_test_runner = "com.android.support.test:runner:${Versions.test_tools}"

View File

@ -13,3 +13,5 @@ org.gradle.jvmargs=-Xmx1536m
# org.gradle.parallel=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
android.useAndroidX=true
android.enableJetifier=true