Skip to content

Commit

Permalink
Fixing Publishing issues (#258)
Browse files Browse the repository at this point in the history
* Fixing publishing issues.

* Removing uneeded maven central issue.
  • Loading branch information
Younes-Charfaoui authored Oct 25, 2024
1 parent 115f27e commit 75eead3
Show file tree
Hide file tree
Showing 2 changed files with 143 additions and 145 deletions.
113 changes: 57 additions & 56 deletions tarka-ui-icons/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,79 +5,80 @@ import java.util.Properties


plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("maven-publish")
id("org.jetbrains.dokka")
id("org.jetbrains.kotlin.plugin.compose")
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("maven-publish")
id("org.jetbrains.dokka")
id("org.jetbrains.kotlin.plugin.compose")
}

android {
namespace = "com.tarkalabs.tarkaui.icons"
compileSdk = 34
namespace = "com.tarkalabs.tarkaui.icons"
compileSdk = 34

defaultConfig {
minSdk = 24
defaultConfig {
minSdk = 24

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
}


publishing {
publications {
register<MavenPublication>("gpr") {
run {
groupId = "com.tarkalabs"
artifactId = "tarkaui-icons"
version = "1.0.6"
artifact("${layout.buildDirectory.get()}/outputs/aar/tarka-ui-icons-release.aar")
}
}
}

repositories {
val localProperties = Properties()
val localPropertiesFile = File("local.properties")
if (localPropertiesFile.exists()) {
localProperties.load(FileInputStream(localPropertiesFile))
localProperties.load(FileInputStream(localPropertiesFile))
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/tarkalabs/tarka-ui-kit-android")
credentials {
username =
System.getenv("GITHUB_USER") ?: localProperties.getProperty("GITHUB_USER")
password =
System.getenv("GITHUB_TOKEN") ?: localProperties.getProperty("GITHUB_TOKEN")
}
}
}
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/tarkalabs/tarka-ui-kit-android")
credentials {
username =
System.getenv("GITHUB_USER") ?: localProperties.getProperty("GITHUB_USER")
password =
System.getenv("GITHUB_TOKEN") ?: localProperties.getProperty("GITHUB_TOKEN")
}

publications {
register<MavenPublication>("gpr") {
groupId = "com.tarkalabs"
artifactId = "tarkaui-icons"
version = "1.0.6"
artifact("${layout.buildDirectory.get()}/outputs/aar/tarka-ui-icons-release.aar")
}
}
}
}

dependencies {
implementation("androidx.core:core-ktx:1.13.1")
implementation("androidx.appcompat:appcompat:1.7.0")
implementation(platform("androidx.compose:compose-bom:2024.10.00"))
implementation("androidx.compose.runtime:runtime")
implementation("androidx.compose.ui:ui")
api("com.microsoft.design:fluent-system-icons:1.1.261@aar")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.2.1")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
implementation("androidx.core:core-ktx:1.13.1")
implementation("androidx.appcompat:appcompat:1.7.0")
implementation(platform("androidx.compose:compose-bom:2024.10.00"))
implementation("androidx.compose.runtime:runtime")
implementation("androidx.compose.ui:ui")
api("com.microsoft.design:fluent-system-icons:1.1.261@aar")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.2.1")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
}
175 changes: 86 additions & 89 deletions tarka-ui/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,114 +1,111 @@
@file:Suppress("UnstableApiUsage")

import java.util.Properties
import java.io.FileInputStream
import java.util.Properties


plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("org.jetbrains.kotlin.plugin.compose")
id("shot")
id("maven-publish")
id ("org.jetbrains.dokka")
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("org.jetbrains.kotlin.plugin.compose")
id("shot")
id("maven-publish")
id("org.jetbrains.dokka")
}

android {
namespace = "com.tarkalabs.tarkaui"
compileSdk = 34
namespace = "com.tarkalabs.tarkaui"
compileSdk = 34

defaultConfig {
minSdk = 26
targetSdk = 34
defaultConfig {
minSdk = 26
targetSdk = 34

testInstrumentationRunner = "com.karumi.shot.ShotTestRunner"
testApplicationId = "com.tarkalabs.tarkaui"
consumerProguardFiles("consumer-rules.pro")
}
testInstrumentationRunner = "com.karumi.shot.ShotTestRunner"
testApplicationId = "com.tarkalabs.tarkaui"
consumerProguardFiles("consumer-rules.pro")
}

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
packagingOptions {
resources {
excludes.add("/META-INF/{AL2.0,LGPL2.1}")
}
}
shot {
tolerance = 0.1
applicationId = "com.tarkalabs.tarkaui"
}
testOptions {
emulatorSnapshots.maxSnapshotsForTestFailures = 10
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
packagingOptions {
resources {
excludes.add("/META-INF/{AL2.0,LGPL2.1}")
sourceSets {
getByName("androidTest").assets.srcDir("$projectDir/src/androidTest/java/com/tarkalabs/uicomponents/assets")
}
}
shot {
tolerance = 0.1
applicationId = "com.tarkalabs.tarkaui"
}
testOptions {
emulatorSnapshots.maxSnapshotsForTestFailures = 10
}
sourceSets {
getByName("androidTest").assets.srcDir("$projectDir/src/androidTest/java/com/tarkalabs/uicomponents/assets")
}
}

fun getLibraryArtifactId() = "tarkaui"

publishing {
publications {
create<MavenPublication>("gpr") {
run {
groupId = "com.tarkalabs"
artifactId = getLibraryArtifactId()
version = "1.2.0"
artifact("${layout.buildDirectory.get()}/outputs/aar/tarka-ui-release.aar")
}
}
}

repositories {
val localProperties = Properties()
val localPropertiesFile = File("local.properties")
if (localPropertiesFile.exists()) {
localProperties.load(FileInputStream(localPropertiesFile))
localProperties.load(FileInputStream(localPropertiesFile))
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/tarkalabs/tarka-ui-kit-android")
credentials {
username =
System.getenv("GITHUB_USER") ?: localProperties.getProperty("GITHUB_USER")
password =
System.getenv("GITHUB_TOKEN") ?: localProperties.getProperty("GITHUB_TOKEN")
}
}
}
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/tarkalabs/tarka-ui-kit-android")
credentials {
username =
System.getenv("GITHUB_USER") ?: localProperties.getProperty("GITHUB_USER")
password =
System.getenv("GITHUB_TOKEN") ?: localProperties.getProperty("GITHUB_TOKEN")
}

publications {
create<MavenPublication>("gpr") {
groupId = "com.tarkalabs"
artifactId = "tarkaui"
version = "1.2.0"
artifact("${layout.buildDirectory.get()}/outputs/aar/tarka-ui-release.aar")
}
}
mavenCentral()
}
}

dependencies {
implementation("androidx.core:core-ktx:1.13.1")
implementation(platform("androidx.compose:compose-bom:2024.10.00"))
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.material3:material3:1.2.1")
implementation("androidx.compose.foundation:foundation")
api("com.tarkalabs:tarkaui-icons:1.0.5")
implementation("org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.7")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.2.1")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
androidTestImplementation("org.mockito.kotlin:mockito-kotlin:4.0.0")
api("com.microsoft.design:fluent-system-icons:1.1.261@aar")

androidTestImplementation("androidx.compose.ui:ui-test-junit4")
androidTestImplementation("org.mockito:mockito-android:4.5.1")
debugImplementation("androidx.compose.ui:ui-test-manifest")
debugImplementation ("androidx.compose.ui:ui-tooling")
androidTestImplementation ("androidx.test:core:1.6.1")

}
implementation("androidx.core:core-ktx:1.13.1")
implementation(platform("androidx.compose:compose-bom:2024.10.00"))
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.material3:material3:1.2.1")
implementation("androidx.compose.foundation:foundation")
api("com.tarkalabs:tarkaui-icons:1.0.6")
implementation("org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.8")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.2.1")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
androidTestImplementation("org.mockito.kotlin:mockito-kotlin:4.0.0")
api("com.microsoft.design:fluent-system-icons:1.1.261@aar")

androidTestImplementation("androidx.compose.ui:ui-test-junit4")
androidTestImplementation("org.mockito:mockito-android:4.5.1")
debugImplementation("androidx.compose.ui:ui-test-manifest")
debugImplementation("androidx.compose.ui:ui-tooling")
androidTestImplementation("androidx.test:core:1.6.1")
}

0 comments on commit 75eead3

Please sign in to comment.