-
-
Save PrashamTrivedi/7e0837756a6b6e0503e9eb26b739fe0c to your computer and use it in GitHub Desktop.
My gradle setups. Replace _ with / like app_build.gradle should convert to app/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.application' | |
apply plugin: 'kotlin-android' | |
apply plugin: 'kotlin-android-extensions' | |
android { | |
compileSdkVersion 27 | |
defaultConfig { | |
applicationId "$AppId" | |
minSdkVersion 23 | |
targetSdkVersion 27 | |
versionCode 1 | |
versionName "1.0" | |
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | |
} | |
buildTypes { | |
release { | |
minifyEnabled false | |
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
} | |
} | |
} | |
dependencies { | |
implementation fileTree(dir: 'libs', include: ['*.jar']) | |
implementation project(':featuremodule') | |
// implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" | |
implementation 'com.android.support:appcompat-v7:27.1.0' | |
testImplementation 'junit:junit:4.12' | |
androidTestImplementation 'com.android.support.test:runner:1.0.1' | |
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |
buildscript { | |
ext.kotlin_version = '1.2.31' | |
ext.plugin_version = "3.2.0-alpha08" | |
repositories { | |
google() | |
jcenter() | |
} | |
dependencies { | |
classpath "com.android.tools.build:gradle:$plugin_version" | |
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 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'kotlin-platform-common' | |
dependencies { | |
implementation "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlin_version" | |
testImplementation "org.jetbrains.kotlin:kotlin-test-common:$kotlin_version" | |
testImplementation "org.jetbrains.kotlin:kotlin-test-annotations-common:$kotlin_version" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.feature' | |
apply plugin: 'kotlin-android' | |
apply plugin: 'kotlin-android-extensions' | |
apply plugin: 'kotlin-platform-android' | |
android { | |
compileSdkVersion 27 | |
baseFeature true | |
defaultConfig { | |
minSdkVersion 23 | |
targetSdkVersion 27 | |
versionCode 1 | |
versionName "1.0" | |
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | |
} | |
buildTypes { | |
release { | |
minifyEnabled false | |
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
} | |
} | |
} | |
dependencies { | |
expectedBy project(':commondata') | |
application project(':app') | |
api 'com.android.support:appcompat-v7:27.1.0' | |
api 'com.android.support.constraint:constraint-layout:1.0.2' | |
implementation fileTree(dir: 'libs', include: ['*.jar']) | |
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1', { | |
exclude group: 'com.android.support', module: 'support-annotations' | |
}) | |
api "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" | |
testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version" | |
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.instantapp' | |
dependencies { | |
implementation project(':featuremodule') | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include ':app', ':commondata', ':instantapp', ':featuremodule' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment