Skip to content

Commit

Permalink
Merge branch 'master' into sp/988-landing-page
Browse files Browse the repository at this point in the history
  • Loading branch information
santosh-pingle committed Jan 6, 2022
2 parents 98bba50 + 6cfadbc commit 83c3c45
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 37 deletions.
64 changes: 64 additions & 0 deletions buildSrc/src/main/kotlin/Releases.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import org.gradle.api.publish.maven.MavenPom

object Releases {
const val groupId = "com.google.android.fhir"

// Libraries

object Engine {
const val artifactId = "engine"
const val version = "0.1.0-alpha05"
const val name = "Android FHIR Engine Library"
}

object DataCapture {
const val artifactId = "data-capture"
const val version = "0.1.0-beta01"
const val name = "Android FHIR Structured Data Capture Library"
}

object Workflow {
const val artifactId = "workflow"
const val version = "0.1.0-alpha01"
const val name = "Android FHIR Workflow Library"
}

// Demo apps

object Demo {
const val applicationId = "com.google.android.fhir.demo"
const val versionCode = 1
const val versionName = "1.0"
}

object Catalog {
const val applicationId = "com.google.android.fhir.catalog"
const val versionCode = 1
const val versionName = "1.0"
}

fun MavenPom.useApache2License() {
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http:https://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
}
}
6 changes: 3 additions & 3 deletions catalog/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ android {
buildToolsVersion = Plugins.Versions.buildTools

defaultConfig {
applicationId = "com.google.android.fhir.catalog"
applicationId = Releases.Catalog.applicationId
minSdk = Sdk.minSdk
targetSdk = Sdk.targetSdk
versionCode = 1
versionName = "1.0"
versionCode = Releases.Catalog.versionCode
versionName = Releases.Catalog.versionName

testInstrumentationRunner = Dependencies.androidJunitRunner
// Required when setting minSdkVersion to 20 or lower
Expand Down
2 changes: 1 addition & 1 deletion catalog/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
<string name="paginated">Paginated</string>
<string name="review">Review</string>
<string name="read_only">Read only</string>
<string name="toolbar_text">SDC Gallery</string>
<string name="toolbar_text">Structured data capture \n Catalog</string>
</resources>
17 changes: 7 additions & 10 deletions datacapture/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Releases.useApache2License

plugins {
id(Plugins.BuildPlugins.androidLib)
id(Plugins.BuildPlugins.kotlinAndroid)
Expand All @@ -10,9 +12,9 @@ afterEvaluate {
publications {
register("release", MavenPublication::class) {
from(components["release"])
artifactId = "data-capture"
groupId = "com.google.android.fhir"
version = "0.1.0-beta01"
groupId = Releases.groupId
artifactId = Releases.DataCapture.artifactId
version = Releases.DataCapture.version
// Also publish source code for developers' convenience
artifact(
tasks.create<Jar>("androidSourcesJar") {
Expand All @@ -21,13 +23,8 @@ afterEvaluate {
}
)
pom {
name.set("Android FHIR Structured Data Capture Library")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http:https://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
name.set(Releases.DataCapture.name)
useApache2License()
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions demo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ plugins {
android {
compileSdk = Sdk.compileSdk
defaultConfig {
applicationId = "com.google.android.fhir.demo"
applicationId = Releases.Demo.applicationId
minSdk = Sdk.minSdk
targetSdk = Sdk.targetSdk
versionCode = 1
versionName = "1.0"
versionCode = Releases.Demo.versionCode
versionName = Releases.Demo.versionName
testInstrumentationRunner = Dependencies.androidJunitRunner
// Required when setting minSdkVersion to 20 or lower
// See https://developer.android.com/studio/write/java8-support
Expand Down
17 changes: 7 additions & 10 deletions engine/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Releases.useApache2License

plugins {
id(Plugins.BuildPlugins.androidLib)
id(Plugins.BuildPlugins.kotlinAndroid)
Expand All @@ -11,9 +13,9 @@ afterEvaluate {
publications {
register("release", MavenPublication::class) {
from(components["release"])
artifactId = "engine"
groupId = "com.google.android.fhir"
version = "0.1.0-alpha05"
groupId = Releases.groupId
artifactId = Releases.Engine.artifactId
version = Releases.Engine.version
// Also publish source code for developers' convenience
artifact(
tasks.create<Jar>("androidSourcesJar") {
Expand All @@ -22,13 +24,8 @@ afterEvaluate {
}
)
pom {
name.set("Android FHIR Engine Library")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http:https://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
name.set(Releases.Engine.name)
useApache2License()
}
}
}
Expand Down
17 changes: 7 additions & 10 deletions workflow/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Releases.useApache2License

plugins {
id(Plugins.BuildPlugins.androidLib)
id(Plugins.BuildPlugins.kotlinAndroid)
Expand All @@ -10,9 +12,9 @@ afterEvaluate {
publications {
register("release", MavenPublication::class) {
from(components["release"])
artifactId = "workflow"
groupId = "com.google.android.fhir"
version = "0.1.0-alpha01"
groupId = Releases.groupId
artifactId = Releases.Workflow.artifactId
version = Releases.Workflow.version
// Also publish source code for developers' convenience
artifact(
tasks.create<Jar>("androidSourcesJar") {
Expand All @@ -21,13 +23,8 @@ afterEvaluate {
}
)
pom {
name.set("Android FHIR Workflow Library")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http:https://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
name.set(Releases.Workflow.name)
useApache2License()
}
}
}
Expand Down

0 comments on commit 83c3c45

Please sign in to comment.