diff --git a/Library/build.gradle.kts b/Library/build.gradle.kts index 819952a..dcd5e46 100644 --- a/Library/build.gradle.kts +++ b/Library/build.gradle.kts @@ -11,7 +11,7 @@ plugins { android { namespace = "com.blipblipcode.library" compileSdk = 36 - + version = "1.3.13" defaultConfig { minSdk = 21 testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" @@ -19,6 +19,12 @@ android { consumerProguardFiles("consumer-rules.pro") } + publishing { + singleVariant("release") { + withSourcesJar() + } + } + buildTypes { release { isMinifyEnabled = false @@ -66,27 +72,22 @@ kotlin { jvmTarget = JvmTarget.JVM_17 } } -publishing { - publications { - create("release") { - groupId = "com.github.LeandroLCD" - artifactId = "query" - version = project.version.toString() - } - } -} - afterEvaluate { - val releaseComponent = components.findByName("release") - if (releaseComponent != null) { - publishing { - publications { - val pub = getByName("release") as MavenPublication - pub.from(releaseComponent) + publishing { + publications { + create("release") { + groupId = "com.github.LeandroLCD" + artifactId = "Librery" + version = project.version.toString() + + val releaseComponent = components.findByName("release") + if (releaseComponent != null) { + from(releaseComponent) + } else { + logger.warn("Android 'release' component not found; maven publication won't include component artifacts.") + } } } - } else { - logger.warn("Android 'release' component not found; maven publication won't include component artifacts.") } } tasks.withType { diff --git a/gradle.properties b/gradle.properties index 87e48fd..9d5b3e0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,4 +21,5 @@ kotlin.code.style=official # Enables namespacing of each library's R class so that its R class includes only the # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true \ No newline at end of file +android.nonTransitiveRClass=true +org.gradle.configuration-cache=true \ No newline at end of file diff --git a/gradlew b/gradlew old mode 100644 new mode 100755