-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
alex
committed
Apr 20, 2023
1 parent
69c7bbf
commit bd12eec
Showing
4 changed files
with
130 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,24 @@ plugins { | |
id 'org.jetbrains.kotlin.android' | ||
} | ||
|
||
ext { | ||
PUBLISH_GROUP_ID = 'com.exyte' | ||
PUBLISH_VERSION = '1.0.0' | ||
PUBLISH_ARTIFACT_ID = 'animated-navigation-bar' | ||
PUBLISH_DESCRIPTION = 'navigation bar with a number of preset animations' | ||
PUBLISH_URL = 'https://github.com/exyte/AndroidAnimatedNavigationBar' | ||
PUBLISH_LICENSE_NAME = 'MIT License' | ||
PUBLISH_LICENSE_URL = 'https://github.com/exyte/AndroidAnimatedNavigationBar/blob/master/LICENSE' | ||
PUBLISH_DEVELOPER_ID = 'exyte' | ||
PUBLISH_DEVELOPER_NAME = 'Alex Yudenkov' | ||
PUBLISH_DEVELOPER_EMAIL = '[email protected]' | ||
PUBLISH_SCM_CONNECTION = 'scm:git:github.com/exyte/AndroidAnimatedNavigationBar.git' | ||
PUBLISH_SCM_DEVELOPER_CONNECTION = 'scm:git:ssh://github.com/exyte/AndroidAnimatedNavigationBar.git' | ||
PUBLISH_SCM_URL = 'https://github.com/exyte/AndroidAnimatedNavigationBar/tree/master' | ||
} | ||
|
||
apply from: "publish-module.gradle" | ||
|
||
android { | ||
compileSdk 33 | ||
|
||
|
@@ -44,8 +62,8 @@ android { | |
} | ||
|
||
dependencies { | ||
implementation 'androidx.core:core-ktx:1.9.0' | ||
implementation 'androidx.core:core-ktx:1.10.0' | ||
implementation "androidx.compose.ui:ui:$compose_ui_version" | ||
implementation "androidx.compose.ui:ui-tooling-preview:$compose_ui_version" | ||
implementation 'androidx.compose.material:material:1.3.1' | ||
implementation 'androidx.compose.material:material:1.4.1' | ||
} |
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'signing' | ||
|
||
tasks.register('androidSourcesJar', Jar) { | ||
archiveClassifier.set('sources') | ||
if (project.plugins.findPlugin("com.android.library")) { | ||
from android.sourceSets.main.java.srcDirs | ||
from android.sourceSets.main.kotlin.srcDirs | ||
} else { | ||
from sourceSets.main.java.srcDirs | ||
from sourceSets.main.kotlin.srcDirs | ||
} | ||
} | ||
|
||
artifacts { | ||
archives androidSourcesJar | ||
} | ||
|
||
group = PUBLISH_GROUP_ID | ||
version = PUBLISH_VERSION | ||
|
||
afterEvaluate { | ||
publishing { | ||
publications { | ||
release(MavenPublication) { | ||
groupId PUBLISH_GROUP_ID | ||
artifactId PUBLISH_ARTIFACT_ID | ||
version PUBLISH_VERSION | ||
|
||
from components.release | ||
|
||
artifact androidSourcesJar | ||
|
||
pom { | ||
name = PUBLISH_ARTIFACT_ID | ||
description = PUBLISH_DESCRIPTION | ||
url = PUBLISH_URL | ||
licenses { | ||
license { | ||
name = PUBLISH_LICENSE_NAME | ||
url = PUBLISH_LICENSE_URL | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = PUBLISH_DEVELOPER_ID | ||
name = PUBLISH_DEVELOPER_NAME | ||
email = PUBLISH_DEVELOPER_EMAIL | ||
} | ||
} | ||
|
||
scm { | ||
connection = PUBLISH_SCM_CONNECTION | ||
developerConnection = PUBLISH_SCM_DEVELOPER_CONNECTION | ||
url = PUBLISH_SCM_URL | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
useInMemoryPgpKeys( | ||
rootProject.ext["signing.keyId"], | ||
rootProject.ext["signing.key"], | ||
rootProject.ext["signing.password"] | ||
) | ||
sign publishing.publications | ||
} |
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
ext["signing.keyId"] = '' | ||
ext["signing.password"] = '' | ||
ext["signing.key"] = '' | ||
ext["ossrhUsername"] = '' | ||
ext["ossrhPassword"] = '' | ||
ext["sonatypeStagingProfileId"] = '' | ||
|
||
|
||
File secretPropsFile = project.rootProject.file('local.properties') | ||
if (secretPropsFile.exists()) { | ||
Properties p = new Properties() | ||
new FileInputStream(secretPropsFile).withCloseable { is -> | ||
p.load(is) | ||
} | ||
p.each { name, value -> | ||
ext[name] = value | ||
} | ||
} else { | ||
ext["ossrhUsername"] = System.getenv('OSSRH_USERNAME') | ||
ext["ossrhPassword"] = System.getenv('OSSRH_PASSWORD') | ||
ext["sonatypeStagingProfileId"] = System.getenv('SONATYPE_STAGING_PROFILE_ID') | ||
ext['signing.keyId'] = System.getenv('SIGNING_KEY_ID') | ||
ext['signing.password'] = System.getenv('SIGNING_PASSWORD') | ||
ext["signing.key"] = System.getenv('SIGNING_KEY') | ||
} | ||
|
||
nexusPublishing { | ||
repositories { | ||
sonatype { | ||
stagingProfileId = sonatypeStagingProfileId | ||
username = ossrhUsername | ||
password = ossrhPassword | ||
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) | ||
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) | ||
} | ||
} | ||
} |