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