Skip to content

Commit

Permalink
chore: first version compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
kikoso committed Jun 10, 2024
1 parent 39228c4 commit 4a42841
Show file tree
Hide file tree
Showing 134 changed files with 225 additions and 467 deletions.
84 changes: 0 additions & 84 deletions app/build.gradle

This file was deleted.

26 changes: 26 additions & 0 deletions build-logic/convention/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
plugins {
`kotlin-dsl`
}

repositories {
google()
mavenCentral()
gradlePluginPortal() // Optional, for other Gradle plugins
}


dependencies {
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.0")
implementation("com.android.tools.build:gradle:7.4.0")
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.5.31")
implementation("org.jacoco:org.jacoco.core:0.8.7")
}

gradlePlugin {
plugins {
register("publishingConventionPlugin") {
id = "android.maps.compose.PublishingConventionPlugin"
implementationClass = "PublishingConventionPlugin"
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
7
0
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
�j�m�j
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build-logic/convention/build/libs/buildSrc.jar
Binary file not shown.
Binary file added build-logic/convention/build/libs/convention.jar
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
implementation-class=PublishingConventionPlugin
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
implementation-class=PublishingConventionPlugin
2 changes: 2 additions & 0 deletions build-logic/convention/build/tmp/jar/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Manifest-Version: 1.0

106 changes: 106 additions & 0 deletions build-logic/convention/src/main/kotlin/PublishingConventionPlugin.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
// buildSrc/src/main/kotlin/PublishingConventionPlugin.kt
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.publish.PublishingExtension
import org.gradle.api.publish.maven.MavenPublication
import org.gradle.kotlin.dsl.*
import org.gradle.testing.jacoco.plugins.JacocoPluginExtension
import org.gradle.api.tasks.testing.Test
import org.gradle.testing.jacoco.plugins.JacocoTaskExtension
import org.gradle.plugins.signing.SigningExtension
import org.gradle.api.publish.maven.*

class PublishingConventionPlugin : Plugin<Project> {
override fun apply(project: Project) {
project.run {

applyPlugins()
configureJacoco()
configurePublishing()
configureSigning()
}
}

private fun Project.applyPlugins() {
apply(plugin = "com.android.library")
apply(plugin = "com.mxalbert.gradle.jacoco-android")
apply(plugin = "maven-publish")
apply(plugin = "org.jetbrains.dokka")
apply(plugin = "signing")
}

private fun Project.configureJacoco() {
configure<JacocoPluginExtension> {
toolVersion = "0.8.7"

}

tasks.withType<Test>().configureEach {
extensions.configure(JacocoTaskExtension::class.java) {
isIncludeNoLocationClasses = true
excludes = listOf("jdk.internal.*")
}
}
}

private fun Project.configurePublishing() {
extensions.configure<com.android.build.gradle.LibraryExtension> {
publishing {
singleVariant("release") {
withSourcesJar()
withJavadocJar()
}
}
}
extensions.configure<PublishingExtension> {
publications {
create<MavenPublication>("aar") {
// from(components["release"])
pom {
name.set(project.name)
description.set("Jetpack Compose components for the Maps SDK for Android")
url.set("https://github.com/googlemaps/android-maps-compose")
scm {
connection.set("scm:[email protected]:googlemaps/android-maps-compose.git")
developerConnection.set("scm:[email protected]:googlemaps/android-maps-compose.git")
url.set("https://github.com/googlemaps/android-maps-compose")
}
licenses {
license {
name.set("The Apache Software License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
distribution.set("repo")
}
}
organization {
name.set("Google Inc")
url.set("http://developers.google.com/maps")
}
developers {
developer {
name.set("Google Inc.")
}
}
}
}
}
repositories {
maven {
val releasesRepoUrl = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
val snapshotsRepoUrl = uri("https://oss.sonatype.org/content/repositories/snapshots/")
url = if (project.version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
credentials {
username = project.findProperty("sonatypeUsername") as String?
password = project.findProperty("sonatypePassword") as String?
}
}
}
}
}

private fun Project.configureSigning() {
configure<SigningExtension> {
sign(extensions.getByType<PublishingExtension>().publications["aar"])
}
}
}
14 changes: 14 additions & 0 deletions build-logic/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
}
versionCatalogs {
create("libs") {
from(files("../gradle/libs.versions.toml"))
}
}
}

rootProject.name = "build-logic"
include(":convention")
128 changes: 0 additions & 128 deletions build.gradle

This file was deleted.

Loading

0 comments on commit 4a42841

Please sign in to comment.