From 8a051c349768594fd1abcb15adde21209aafdb2c Mon Sep 17 00:00:00 2001 From: Gergely Hegedus Date: Fri, 30 Jul 2021 23:45:37 +0300 Subject: [PATCH] deployment setup --- annotation/build.gradle | 5 ++++- deploy.gradle | 30 ++++++++++++++++++++++++++++++ processor/build.gradle | 5 ++++- 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 deploy.gradle diff --git a/annotation/build.gradle b/annotation/build.gradle index cc4bf1a..28747fe 100644 --- a/annotation/build.gradle +++ b/annotation/build.gradle @@ -9,4 +9,7 @@ java { } sourceCompatibility = "8" -targetCompatibility = "8" \ No newline at end of file +targetCompatibility = "8" + +project.ext.set("library_artifact","annotation") +apply from: "../deploy.gradle" \ No newline at end of file diff --git a/deploy.gradle b/deploy.gradle new file mode 100644 index 0000000..4ea9285 --- /dev/null +++ b/deploy.gradle @@ -0,0 +1,30 @@ +apply plugin: 'maven-publish' + +task sourcesJar(type: Jar, dependsOn: classes) { + classifier = 'sources' + from sourceSets.main.allSource +} + +publishing { + publications { + mavenJava(MavenPublication) { + from components.java + + groupId "org.fnives.library.reloadable.module" + version "0.1.0" + artifactId "$library_artifact" + artifact sourcesJar + } + } + + repositories { + maven { + name = "GitHubPackages" + url = uri("https://maven.pkg.github.com/fknives/ReloadableHiltModule") + credentials { + username = System.getenv("GITHUB_USERNAME") + password = System.getenv("GITHUB_TOKEN") + } + } + } +} \ No newline at end of file diff --git a/processor/build.gradle b/processor/build.gradle index d98af28..5942dea 100644 --- a/processor/build.gradle +++ b/processor/build.gradle @@ -29,4 +29,7 @@ dependencies { } sourceCompatibility = "8" -targetCompatibility = "8" \ No newline at end of file +targetCompatibility = "8" + +project.ext.set("library_artifact","annotation-processor") +apply from: "../deploy.gradle" \ No newline at end of file