Hi,
I want build an SDk where I have put all the required changes and try to sync the build file but I am getting the below issue
Starting Gradle Daemon...
Gradle Daemon started in 1 s 741 ms
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
Where:
Build file '/Users/fci-ma2076/Documents/projects/T/Test/build.gradle.kts' line: 44What went wrong:
SoftwareComponent with name 'release' not found.-
Try:
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.
This is my build.gradle for library folder
plugins {
id("maven-publish")
id("com.android.library")
}
android {
namespace = "com.Test"
compileSdk = 34
defaultConfig {
minSdk = 21
lint.targetSdk = 35
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}
buildTypes {
getByName("release") {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}
dependencies {
implementation(libs.androidx.appcompat)
implementation(libs.material)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
}
publishing {
publications {
create("release") {
from(components["release"])
groupId = "io.github.Rishav1995-roy"
artifactId = "test-library"
version = "1.0.3"
artifact(tasks["bundleReleaseAar"])
}
}
repositories {
maven {
url = uri("file://${rootProject.projectDir}/repo")
}
}
}
Please can anyone suggest me what should I need to go in this file so that this issue will not occur
Top comments (0)