Skip to content

Commit 125f338

Browse files
committed
DLT-2384: Publishing dialtone-icons for android
1 parent 5538473 commit 125f338

File tree

10 files changed

+494
-1
lines changed

10 files changed

+494
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ out
3030
packages/dialtone-icons/index.js
3131
packages/dialtone-icons/src/icons
3232
packages/dialtone-icons/src/illustrations
33+
packages/dialtone-icons/dist*/*
3334

3435
# Dialtone tokens #
3536
packages/dialtone-tokens/token_transformer
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest package="dialtone.dialpad.icons" />
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
plugins {
2+
id('com.android.library') version '7.1.1'
3+
id 'org.jetbrains.kotlin.android' version '1.7.20'
4+
id ('maven-publish')
5+
id 'org.jetbrains.gradle.plugin.idea-ext' version '1.1.7'
6+
}
7+
8+
idea {
9+
module {
10+
settings {
11+
packagePrefix["src/main/kotlin"] = "dialtone.dialpad"
12+
}
13+
}
14+
}
15+
16+
ext.kotlin_version = '1.7.20'
17+
project.buildDir = '../dist_android'
18+
19+
repositories {
20+
mavenCentral()
21+
google()
22+
}
23+
24+
dependencies {
25+
def composeBom = platform('androidx.compose:compose-bom:2022.10.00')
26+
implementation composeBom
27+
implementation 'androidx.compose.ui:ui'
28+
}
29+
30+
android {
31+
sourceSets {
32+
main {
33+
java.srcDirs = ['../dist/android/kotlin']
34+
res.srcDirs = ['../dist/android/res']
35+
manifest.srcFile '../dist/android/AndroidManifest.xml'
36+
}
37+
}
38+
}
39+
40+
41+
task androidSourcesJar(type: Jar) {
42+
archiveClassifier.set('sources')
43+
from android.sourceSets.main.java.srcDirs
44+
}
45+
46+
task setProperties(type: WriteProperties) {
47+
outputFile = file('gradle.properties')
48+
property 'android.useAndroidX', true
49+
property 'version', version
50+
}
51+
52+
afterEvaluate {
53+
publishing {
54+
publications {
55+
release(MavenPublication) {
56+
from components.release
57+
58+
// sources
59+
artifact androidSourcesJar
60+
61+
groupId = 'dialtone.dialpad'
62+
63+
64+
pom {
65+
name = 'Dialtone Icons'
66+
description = "Icons and Illustrations for Dialpad's design system, Dialtone."
67+
url = 'https://dialtone.dialpad.com/design/icons/'
68+
69+
licenses {
70+
license {
71+
name = 'MIT'
72+
url = 'https://github.com/dialpad/dialtone/blob/staging/LICENSE'
73+
}
74+
}
75+
76+
scm {
77+
connection = 'scm:git:git://github.com/dialpad/dialtone.git'
78+
developerConnection = 'scm:git:ssh://github.com/dialpad/dialtone.git'
79+
url = 'https//github.com/dialpad/dialtone'
80+
}
81+
82+
}
83+
}
84+
}
85+
repositories {
86+
maven {
87+
name = "Dialtone Icons Maven Packages"
88+
url = uri("https://maven.pkg.github.com/dialpad/dialtone")
89+
credentials {
90+
username = project.findProperty("release.user") ?: System.getenv("GITHUB_USER")
91+
password = project.findProperty("release.key") ?: System.getenv("GITHUB_TOKEN")
92+
}
93+
}
94+
}
95+
}
96+
}
97+
98+
artifacts {
99+
archives androidSourcesJar
100+
}
101+
102+
android {
103+
compileSdkVersion 31
104+
defaultConfig {
105+
minSdkVersion 21
106+
targetSdkVersion 31
107+
versionCode 1
108+
versionName '1.0'
109+
}
110+
buildFeatures {
111+
compose true
112+
}
113+
composeOptions {
114+
kotlinCompilerExtensionVersion = "1.3.2"
115+
}
116+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
android.useAndroidX=true
2+
version=0.1.0
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

packages/dialtone-icons/android/gradlew

Lines changed: 240 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)