Skip to content

Commit ffaef49

Browse files
committed
Initialize Compose Multiplatform library with Gradle setup and Maven publishing configuration.
1 parent 44e1a97 commit ffaef49

11 files changed

Lines changed: 584 additions & 0 deletions

compose/.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
*.iml
3+
.gradle
4+
.idea
5+
.kotlin
6+
.DS_Store
7+
build
8+
*/build
9+
captures
10+
.externalNativeBuild
11+
.cxx
12+
local.properties
13+
xcuserdata/
14+
Pods/
15+
*.jks
16+
*.gpg
17+
*yarn.lock

compose/README.MD

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Fluent UI System Icons for Compose Multiplatform
2+
3+
### Publish to MavenLocal
4+
5+
1) Run `./gradlew :library:publishToMavenLocal`
6+
2) Open `~/.m2/repository/com/microsoft/design/compose/`
7+
8+
### Publish to MavenCentral
9+
10+
1) Create an account and a namespace on Sonatype:
11+
https://central.sonatype.org/register/central-portal/#create-an-account
12+
2) Add developer id, name, email and the project url to
13+
`./library/build.gradle.kts`
14+
3) Generate a GPG key:
15+
https://getstream.io/blog/publishing-libraries-to-mavencentral-2021/#generating-a-gpg-key-pair
16+
```
17+
gpg --full-gen-key
18+
gpg --keyserver keyserver.ubuntu.com --send-keys XXXXXXXX
19+
gpg --export-secret-key XXXXXXXX > XXXXXXXX.gpg
20+
```
21+
4) Add these lines to `gradle.properties`:
22+
```
23+
signing.keyId=XXXXXXXX
24+
signing.password=[key password]
25+
signing.secretKeyRingFile=../XXXXXXXX.gpg
26+
mavenCentralUsername=[generated username]
27+
mavenCentralPassword=[generated password]
28+
```
29+
5) Run `./gradlew :library:publishAndReleaseToMavenCentral --no-configuration-cache`

compose/build.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
plugins {
2+
alias(libs.plugins.multiplatform).apply(false)
3+
alias(libs.plugins.android.library).apply(false)
4+
alias(libs.plugins.maven.publish).apply(false)
5+
alias(libs.plugins.compose.compiler).apply(false)
6+
alias(libs.plugins.compose).apply(false)
7+
}

compose/gradle.properties

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#Gradle
2+
org.gradle.jvmargs=-Xmx4G
3+
org.gradle.caching=true
4+
org.gradle.configuration-cache=true
5+
org.gradle.daemon=true
6+
org.gradle.parallel=true
7+
8+
#Kotlin
9+
kotlin.code.style=official
10+
kotlin.daemon.jvmargs=-Xmx4G
11+
kotlin.native.binary.gc=cms
12+
13+
#Android
14+
android.useAndroidX=true
15+
android.nonTransitiveRClass=true
16+
17+
#Compose
18+
org.jetbrains.compose.experimental.jscanvas.enabled=true

compose/gradle/libs.versions.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[versions]
2+
3+
kotlin = "2.1.21"
4+
agp = "8.9.3"
5+
maven-publish = "0.32.0"
6+
compose = "1.8.1"
7+
8+
[libraries]
9+
10+
11+
[plugins]
12+
13+
multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
14+
android-library = { id = "com.android.library", version.ref = "agp" }
15+
maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "maven-publish" }
16+
compose = { id = "org.jetbrains.compose", version.ref = "compose" }
17+
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
42.4 KB
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

compose/gradlew

Lines changed: 249 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)