Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Commit

Permalink
update publishing setup for AGP 4.0.0
Browse files Browse the repository at this point in the history
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
  • Loading branch information
msfjarvis committed Jun 6, 2020
1 parent 42e1f66 commit 260fd31
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 19 deletions.
2 changes: 1 addition & 1 deletion dependencies.gradle
Expand Up @@ -8,7 +8,7 @@ ext.versions = [

ext.deps = [
gradle_plugins: [
android: "com.android.tools.build:gradle:3.5.2",
android: "com.android.tools.build:gradle:4.0.0",
spotless: "com.diffplug.spotless:spotless-plugin-gradle:3.26.0",
versions: "com.github.ben-manes:gradle-versions-plugin:0.27.0",
bintray_release: "com.novoda:bintray-release:0.9.1",
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 2 additions & 0 deletions gradlew
Expand Up @@ -82,6 +82,7 @@ esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar


# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
Expand Down Expand Up @@ -129,6 +130,7 @@ fi
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`

JAVACMD=`cygpath --unix "$JAVACMD"`

# We build the pattern for arguments to be converted via cygpath
Expand Down
4 changes: 4 additions & 0 deletions gradlew.bat
Expand Up @@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

Expand Down Expand Up @@ -81,6 +84,7 @@ set CMD_LINE_ARGS=%*

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

Expand Down
36 changes: 19 additions & 17 deletions library/build.gradle
@@ -1,6 +1,6 @@
apply plugin: "com.android.library"
apply plugin: "kotlin-android"
apply plugin: "digital.wup.android-maven-publish"
apply plugin: "maven-publish"

apply from: "../dependencies.gradle"
// apply from: "../bintrayconfig.gradle"
Expand Down Expand Up @@ -29,24 +29,26 @@ android {
}
}

publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/msfjarvis/github-packages-deployment-sample")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("PASSWORD")
afterEvaluate {
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/msfjarvis/github-packages-deployment-sample")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("PASSWORD")
}
}
}
}
publications {
gpr(MavenPublication) {
from(components.android)
groupId "$GROUP"
artifactId "deployment-sample-library"
// Use your configured version outside CI, the SHA of the top commit inside.
version System.env['GITHUB_SHA'] == null ? "$VERSION" : System.env['GITHUB_SHA']
publications {
release(MavenPublication) {
from components.release
groupId = "$GROUP"
artifactId = "deployment-sample-library"
// Use your configured version outside CI, the SHA of the top commit inside.
version = System.env['GITHUB_SHA'] == null ? "$VERSION" : System.env['GITHUB_SHA']
}
}
}
}
Expand Down

0 comments on commit 260fd31

Please sign in to comment.