buildscript {
	repositories {
		mavenCentral()
	}
	dependencies {
		classpath 'com.android.tools.build:gradle:0.9.1'
	}
}

apply plugin: 'android'

dependencies {
	compile files('libs/android-support-v4.jar')
	compile project(':extern:AndroidPinning')
	compile project(':extern:UniversalImageLoader:library')
	compile project(':extern:MemorizingTrustManager')
}

project(':extern:UniversalImageLoader:library') {
	buildscript {
		repositories {
			mavenCentral()
		}
		dependencies {
			classpath 'com.android.tools.build:gradle:0.9.1'
		}
	}

	apply plugin: 'android'

	android {
		compileSdkVersion 16
		buildToolsVersion '19.0.3'

		sourceSets {
			main {
				manifest.srcFile 'AndroidManifest.xml'
				java.srcDirs = ['src']
				resources.srcDirs = ['src']
				aidl.srcDirs = ['src']
				renderscript.srcDirs = ['src']
			}
		}
	}
}

android {
	compileSdkVersion 19
	buildToolsVersion '19.0.3'

	sourceSets {
		main {
			manifest.srcFile 'AndroidManifest.xml'
			java.srcDirs = ['src']
			resources.srcDirs = ['src']
			aidl.srcDirs = ['src']
			renderscript.srcDirs = ['src']
			res.srcDirs = ['res']
			assets.srcDirs = ['assets']
		}

		instrumentTest.setRoot('test')
	}

	buildTypes {
		release {
			runProguard true
			proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
		}
	}

	tasks.withType(Compile) {
		options.encoding = "UTF-8"
	}
}
