Add some logic for signing releases
This commit is contained in:
		
							parent
							
								
									c83e49d1b8
								
							
						
					
					
						commit
						90898ec3d4
					
				
							
								
								
									
										29
									
								
								build.gradle
									
									
									
									
									
								
							
							
						
						
									
										29
									
								
								build.gradle
									
									
									
									
									
								
							| @ -52,15 +52,44 @@ android { | |||||||
| 		sourceCompatibility JavaVersion.VERSION_1_7 | 		sourceCompatibility JavaVersion.VERSION_1_7 | ||||||
| 		targetCompatibility JavaVersion.VERSION_1_7 | 		targetCompatibility JavaVersion.VERSION_1_7 | ||||||
| 	} | 	} | ||||||
|  | 
 | ||||||
|  | 	// | ||||||
|  | 	// To sign release builds, create the file `gradle.properties` in | ||||||
|  | 	// $HOME/.gradle or in your project directory with this content: | ||||||
|  | 	// | ||||||
|  | 	// mStoreFile=/path/to/key.store | ||||||
|  | 	// mStorePassword=xxx | ||||||
|  | 	// mKeyAlias=alias | ||||||
|  | 	// mKeyPassword=xxx | ||||||
|  | 	// | ||||||
|  | 	if (project.hasProperty('mStoreFile') && | ||||||
|  | 			project.hasProperty('mStorePassword') && | ||||||
|  | 			project.hasProperty('mKeyAlias') && | ||||||
|  | 			project.hasProperty('mKeyPassword')) { | ||||||
|  | 		signingConfigs { | ||||||
|  | 			release { | ||||||
|  | 				storeFile file(mStoreFile) | ||||||
|  | 					storePassword mStorePassword | ||||||
|  | 					keyAlias mKeyAlias | ||||||
|  | 					keyPassword mKeyPassword | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 		buildTypes.release.signingConfig = signingConfigs.release | ||||||
|  | 	} else { | ||||||
|  | 		buildTypes.release.signingConfig = null | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
| 	buildTypes { | 	buildTypes { | ||||||
| 		release { | 		release { | ||||||
| 			runProguard true | 			runProguard true | ||||||
| 			proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' | 			proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  | 
 | ||||||
| 	lintOptions { | 	lintOptions { | ||||||
| 		disable 'MissingTranslation', 'InvalidPackage' | 		disable 'MissingTranslation', 'InvalidPackage' | ||||||
| 	} | 	} | ||||||
|  | 
 | ||||||
| 	subprojects { | 	subprojects { | ||||||
| 
 | 
 | ||||||
| 		afterEvaluate { | 		afterEvaluate { | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Sam Whited
						Sam Whited