Skip to content

Instantly share code, notes, and snippets.

@emedinaa
Created December 3, 2019 03:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emedinaa/11757b3a81c037e4628539ea9568cf1e to your computer and use it in GitHub Desktop.
Save emedinaa/11757b3a81c037e4628539ea9568cf1e to your computer and use it in GitHub Desktop.
androidx+material
//build.gradle
buildscript {
ext.kotlin_version = '1.3.21'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
ext {
minSdkVersion = 14
targetSdkVersion = 28
compileSdkVersion = 28
androidXVersion = '1.0.0'
appCompatVersion = '1.0.2'
archLifecycleVersion = '2.0.0'
constraintLayoutVersion = '1.1.3'
recyclerViewVersion = '1.0.0'
cardViewVersion = '1.0.0'
runnerVersion = '1.0.1'
rulesVersion = '1.0.1'
espressoVersion = '3.1.1'
junitVersion = '4.12'
}
//app build.gradle
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
//compileSdkVersion 28
compileSdkVersion rootProject.compileSdkVersion
defaultConfig {
applicationId "com.emedinaa.kotlinapp"
//minSdkVersion 14
minSdkVersion rootProject.minSdkVersion
//targetSdkVersion 28
targetSdkVersion rootProject.targetSdkVersion
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "androidx.appcompat:appcompat:$appCompatVersion"
implementation "androidx.core:core-ktx:$androidXVersion"
implementation "androidx.constraintlayout:constraintlayout:$constraintLayoutVersion"
implementation "androidx.recyclerview:recyclerview:$recyclerViewVersion"
implementation "com.google.android.material:material:1.0.0"
implementation "androidx.cardview:cardview:1.0.0"
implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test:runner:$runnerVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$espressoVersion"
/*implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
implementation 'androidx.core:core-ktx:1.2.0-alpha02'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'*/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment