Skip to content

Instantly share code, notes, and snippets.

@AlexZhukovich
Created November 13, 2016 09:47
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 AlexZhukovich/6a3b9c358106831c2b7500f0ce5d6197 to your computer and use it in GitHub Desktop.
Save AlexZhukovich/6a3b9c358106831c2b7500f0ce5d6197 to your computer and use it in GitHub Desktop.
Import an external module to Android Project in Android Studio (http://alexzh.com/tutorials/import-an-external-module-in-android-studio/)
//ExternalModulesInProject/Application/app
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.alexzh.application"
minSdkVersion 14
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.0.0'
testCompile 'junit:junit:4.12'
compile project(':simpledateformatter')
}
//ExternalModulesInProject/Application
include ':app'
include ':simpledateformatter'
project(':simpledateformatter').projectDir = new File(settingsDir, '../simpledateformatter')
//ExternalModulesInProject/simpledateformatter
apply plugin: 'java'
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
sourceCompatibility = "1.7"
targetCompatibility = "1.7"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment