-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/add-changelog
- Loading branch information
Showing
45 changed files
with
282 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Empty file.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,22 +13,17 @@ | |
* applications and/or if you’d like to contribute to the development of the SDK, please | ||
* contact D4L by email to [email protected]. | ||
*/ | ||
|
||
buildscript { | ||
dependencies { | ||
classpath(GradlePlugins.kotlin) | ||
classpath(GradlePlugins.android) | ||
} | ||
} | ||
import care.data4life.sdk.result.dependency.d4l | ||
import care.data4life.sdk.result.dependency.gitHub | ||
|
||
plugins { | ||
kotlinMultiplatform(false) | ||
id("care.data4life.sdk.result.dependency") | ||
|
||
id("scripts.dependency-updates") | ||
id("scripts.download-scripts") | ||
id("scripts.publishing") | ||
id("scripts.quality-spotless") | ||
id("scripts.versioning") | ||
id("care.data4life.sdk.result.dependency-updates") | ||
id("care.data4life.sdk.result.download-scripts") | ||
id("care.data4life.sdk.result.publishing") | ||
id("care.data4life.sdk.result.quality-spotless") | ||
id("care.data4life.sdk.result.versioning") | ||
} | ||
|
||
allprojects { | ||
|
@@ -43,6 +38,6 @@ allprojects { | |
} | ||
|
||
tasks.named<Wrapper>("wrapper") { | ||
gradleVersion = "6.8.3" | ||
gradleVersion = "6.9" | ||
distributionType = Wrapper.DistributionType.ALL | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,22 +13,23 @@ | |
* applications and/or if you’d like to contribute to the development of the SDK, please | ||
* contact D4L by email to [email protected]. | ||
*/ | ||
package care.data4life.sdk.result | ||
|
||
object LibraryConfig { | ||
val publishConfig = PublishConfig | ||
val android = AndroidLibraryConfig | ||
|
||
const val group = "care.data4life" | ||
const val name = "hc-result-sdk-kmp" | ||
|
||
const val githubOwner = "d4l-data4life" | ||
const val githubRepository = "hc-result-sdk-kmp" | ||
|
||
val publish = PublishConfig | ||
|
||
object PublishConfig { | ||
const val name = LibraryConfig.name | ||
const val groupId = "care.data4life.hc-result-sdk-kmp" | ||
const val description = "This is the Result SDK which provides unified result types and errors for other SDK's." | ||
const val groupId = "${LibraryConfig.group}.${LibraryConfig.name}" | ||
|
||
const val year = "2020" | ||
const val year = "2021" | ||
|
||
// URL | ||
const val host = "github.com" | ||
|
@@ -52,8 +53,6 @@ object LibraryConfig { | |
const val scmDeveloperConnection = scmConnection | ||
} | ||
|
||
val android = AndroidLibraryConfig | ||
|
||
object AndroidLibraryConfig { | ||
const val minSdkVersion = 23 | ||
const val compileSdkVersion = 30 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
* contact D4L by email to [email protected]. | ||
*/ | ||
|
||
package scripts | ||
package care.data4life.sdk.result | ||
|
||
/** | ||
* [DependencyUpdates](https://github.com/ben-manes/gradle-versions-plugin) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
* contact D4L by email to [email protected]. | ||
*/ | ||
|
||
package scripts | ||
package care.data4life.sdk.result | ||
|
||
import de.undercouch.gradle.tasks.download.Download | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,26 +14,27 @@ | |
* contact D4L by email to [email protected]. | ||
*/ | ||
|
||
package scripts | ||
package care.data4life.sdk.result | ||
|
||
import LibraryConfig | ||
import org.gradle.api.publish.maven.MavenPublication | ||
|
||
/** | ||
* Usage: | ||
* Install: | ||
* | ||
* Now just add id("scripts.publishing-config") to your projects build.gradle.kts plugins section | ||
* Just add id("care.data4life.sdk.result.publishing-config") to your project module build.gradle.kts plugins section | ||
* | ||
* plugins { | ||
* id("scripts.publishing") | ||
* id("care.data4life.sdk.result.publishing-config") | ||
* } | ||
* | ||
* Usage: | ||
* | ||
* To publish to to https://github.com/d4l-data4life/maven-repository/ just run: | ||
* - ./gradlew publishFeature | ||
* - ./gradlew publishSnapshot | ||
* - ./gradlew publishRelease | ||
* | ||
* This requires a LibraryConfig as defined here https://github.com/d4l-data4life/hc-gradle-scripts/blob/main/buildSrc/src/main/kotlin/LibraryConfig.kt | ||
* This requires a care.data4life.sdk.result.care.data4life.sdk.result.LibraryConfig configured | ||
*/ | ||
plugins { | ||
`maven-publish` | ||
|
@@ -46,9 +47,9 @@ publishing { | |
setUrl("https://maven.pkg.github.com/${LibraryConfig.githubOwner}/${LibraryConfig.githubRepository}") | ||
credentials { | ||
username = (project.findProperty("gpr.user") | ||
?: System.getenv("PACKAGE_REGISTRY_USERNAME")).toString() | ||
?: System.getenv("PACKAGE_REGISTRY_UPLOAD_USERNAME")).toString() | ||
password = (project.findProperty("gpr.key") | ||
?: System.getenv("PACKAGE_REGISTRY_TOKEN")).toString() | ||
?: System.getenv("PACKAGE_REGISTRY_UPLOAD_TOKEN")).toString() | ||
} | ||
} | ||
|
||
|
@@ -72,34 +73,33 @@ publishing { | |
|
||
publications { | ||
withType<MavenPublication> { | ||
groupId = LibraryConfig.publish.groupId | ||
groupId = LibraryConfig.PublishConfig.groupId | ||
|
||
pom { | ||
name.set(LibraryConfig.publish.name) | ||
description.set(LibraryConfig.publish.description) | ||
url.set(LibraryConfig.publish.url) | ||
inceptionYear.set(LibraryConfig.publish.year) | ||
description.set(LibraryConfig.PublishConfig.description) | ||
url.set(LibraryConfig.PublishConfig.url) | ||
inceptionYear.set(LibraryConfig.PublishConfig.year) | ||
|
||
licenses { | ||
license { | ||
name.set(LibraryConfig.publish.licenseName) | ||
url.set(LibraryConfig.publish.licenseUrl) | ||
distribution.set(LibraryConfig.publish.licenseDistribution) | ||
name.set(LibraryConfig.PublishConfig.licenseName) | ||
url.set(LibraryConfig.PublishConfig.licenseUrl) | ||
distribution.set(LibraryConfig.PublishConfig.licenseDistribution) | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id.set(LibraryConfig.publish.developerId) | ||
name.set(LibraryConfig.publish.developerName) | ||
email.set(LibraryConfig.publish.developerEmail) | ||
id.set(LibraryConfig.PublishConfig.developerId) | ||
name.set(LibraryConfig.PublishConfig.developerName) | ||
email.set(LibraryConfig.PublishConfig.developerEmail) | ||
} | ||
} | ||
|
||
scm { | ||
connection.set(LibraryConfig.publish.scmConnection) | ||
developerConnection.set(LibraryConfig.publish.scmDeveloperConnection) | ||
url.set(LibraryConfig.publish.scmUrl) | ||
connection.set(LibraryConfig.PublishConfig.scmConnection) | ||
developerConnection.set(LibraryConfig.PublishConfig.scmDeveloperConnection) | ||
url.set(LibraryConfig.PublishConfig.scmUrl) | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,17 +14,18 @@ | |
* contact D4L by email to [email protected]. | ||
*/ | ||
|
||
package scripts | ||
package care.data4life.sdk.result | ||
|
||
import LibraryConfig | ||
import org.eclipse.jgit.api.Git | ||
import org.eclipse.jgit.api.ResetCommand | ||
import org.eclipse.jgit.transport.PushResult | ||
import org.eclipse.jgit.transport.RemoteRefUpdate | ||
import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider | ||
|
||
/** | ||
* Usage: | ||
* Publish generated artefacts to our maven-repository using [jGit](https://www.eclipse.org/jgit/) | ||
* | ||
* Install: | ||
* | ||
* You need to add following dependencies to the buildSrc/build.gradle.kts | ||
* | ||
|
@@ -38,12 +39,14 @@ import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider | |
* mavenCentral() | ||
* } | ||
* | ||
* Now just add id("scripts.publishing") to your rootProject build.gradle.kts plugins | ||
* Now just add id("care.data4life.sdk.result.publishing") to your rootProject build.gradle.kts plugins | ||
* | ||
* plugins { | ||
* id("scripts.publishing") | ||
* id("care.data4life.sdk.result.publishing") | ||
* } | ||
* | ||
* Usage: | ||
* | ||
* To publish to to https://github.com/d4l-data4life/maven-features/ just run: | ||
* - ./gradlew publishFeature | ||
* To publish to to https://github.com/d4l-data4life/maven-snapshots/ just run: | ||
|
@@ -63,7 +66,7 @@ val releaseRepoName = "maven-releases" | |
val basePath = "${rootProject.buildDir}/gitPublish" | ||
|
||
val gitHubToken = (project.findProperty("gpr.key") | ||
?: System.getenv("PACKAGE_REGISTRY_TOKEN")).toString() | ||
?: System.getenv("PACKAGE_REGISTRY_UPLOAD_TOKEN")).toString() | ||
|
||
|
||
task<Exec>("publishFeature") { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
* contact D4L by email to [email protected]. | ||
*/ | ||
|
||
package scripts | ||
package care.data4life.sdk.result | ||
|
||
/** | ||
* You need to add following dependencies to the buildSrc/build.gradle.kts | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
* applications and/or if you’d like to contribute to the development of the SDK, please | ||
* contact D4L by email to [email protected]. | ||
*/ | ||
package scripts | ||
package care.data4life.sdk.result | ||
|
||
/** | ||
* Usage: | ||
|
Oops, something went wrong.