Skip to content

Commit

Permalink
Move API versioning to version.properties, switch to integer
Browse files Browse the repository at this point in the history
Use a separate API code for injecting into the API manifest metadata element.
  • Loading branch information
ianhanniballake committed Mar 10, 2017
1 parent 9a24d52 commit 0ad7875
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 6 additions & 2 deletions api/build.gradle
Expand Up @@ -18,8 +18,12 @@ apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'signing'

def Properties versionProps = new Properties()
versionProps.load(new FileInputStream(file('../version.properties')))

group = 'com.google.android.apps.muzei'
version = '2.3'
version = versionProps['apiName']


def Properties props = new Properties()
props.load(new FileInputStream(file('../local.properties')))
Expand All @@ -39,7 +43,7 @@ android {
minSdkVersion 11
targetSdkVersion rootProject.ext.targetSdkVersion

manifestPlaceholders = [api_version: version]
manifestPlaceholders = [api_version: versionProps['apiCode'].toInteger()]
}

compileOptions {
Expand Down
3 changes: 3 additions & 0 deletions version.properties
Expand Up @@ -14,6 +14,9 @@
# limitations under the License.
#

apiName = 2.3
apiCode = 230

name = 2.3.1
# Version number + unique ID for the build
codeWear = 23105
Expand Down

0 comments on commit 0ad7875

Please sign in to comment.