From df5e96d67d189ec82c9b7869bf653246b731f4c8 Mon Sep 17 00:00:00 2001 From: vitaviva Date: Tue, 25 May 2021 20:06:10 +0800 Subject: [PATCH] add publish.gradle --- build.gradle | 3 +++ gradle.properties | 2 +- gradle/publish.gradle | 22 ++++++++++++++++++++++ library/build.gradle | 16 +++++++++++++++- 4 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 gradle/publish.gradle diff --git a/build.gradle b/build.gradle index 9e66544..8f28a03 100644 --- a/build.gradle +++ b/build.gradle @@ -7,6 +7,8 @@ buildscript { google() mavenCentral() jcenter() + mavenLocal() + } dependencies { classpath 'com.android.tools.build:gradle:4.0.2' @@ -24,6 +26,7 @@ allprojects { google() mavenCentral() maven { url 'https://jitpack.io' } + mavenLocal() } tasks.withType(Javadoc).all { diff --git a/gradle.properties b/gradle.properties index 941d968..a53f2c5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -23,5 +23,5 @@ kotlin.code.style=official # bintray upload USER_ORG=vitaviva ARTIFACT_GROUP=com.github.fragivity -ARTIFACT_VERSION=0.2.6.2 +ARTIFACT_VERSION=0.2.6.6 WEB_SITE=https://github.com/vitaviva/fragivity diff --git a/gradle/publish.gradle b/gradle/publish.gradle new file mode 100644 index 0000000..3848074 --- /dev/null +++ b/gradle/publish.gradle @@ -0,0 +1,22 @@ +apply plugin: 'maven-publish' + + +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + from components.release + groupId = ARTIFACT_GROUP + artifactId = ARTIFACT_NAME + version = ARTIFACT_VERSION + } + + debug(MavenPublication) { + from components.debug + groupId = ARTIFACT_GROUP + artifactId = ARTIFACT_NAME + version = ARTIFACT_VERSION + } + } + } +} \ No newline at end of file diff --git a/library/build.gradle b/library/build.gradle index 71b4b69..a3b75c5 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -58,4 +58,18 @@ configurations.all { } } -apply from: rootProject.file("gradle/bintray.gradle") \ No newline at end of file + +apply from: rootProject.file("gradle/publish.gradle") + + + +//publish { +// userOrg = USER_ORG +// groupId = ARTIFACT_GROUP +// artifactId = ARTIFACT_NAME +// publishVersion = ARTIFACT_VERSION +// desc = 'Use Fragment like Activity' +// website = 'https://github.com/vitaviva/fragivity' +//} + +//apply from: rootProject.file("gradle/bintray.gradle") \ No newline at end of file