-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
74 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,29 @@ GROUP=ch.ubique.gradle | |
ARTIFACT_ID=preset | ||
# VERSION will only be used if no property "githubRefName" is set (which the release workflow does) | ||
VERSION=0.0.0 | ||
DISPLAY_NAME=Ubique Preset | ||
DESCRIPTION=Provides default Gradle configurations and utility methods for Android app projects. | ||
WEBSITE=https://github.com/UbiqueInnovation/gradle-plugin-ubique-preset-android | ||
VCS_URL=https://github.com/UbiqueInnovation/gradle-plugin-ubique-preset-android | ||
IMPLEMENTATION_CLASS=ch.ubique.gradle.preset.PresetPlugin | ||
|
||
# POM metadata | ||
POM_NAME=preset | ||
POM_PACKAGING=jar | ||
POM_DESCRIPTION=Provides default Gradle configurations and utility methods for Android app projects. | ||
POM_INCEPTION_YEAR=2024 | ||
|
||
# POM URLs | ||
POM_URL=https://github.com/UbiqueInnovation/gradle-plugin-ubique-preset-android | ||
POM_SCM_URL=https://github.com/UbiqueInnovation/gradle-plugin-ubique-preset-android | ||
POM_SCM_CONNECTION=scm:[email protected]:UbiqueInnovation/gradle-plugin-ubique-preset-android.git | ||
POM_SCM_DEV_CONNECTION=scm:[email protected]:UbiqueInnovation/gradle-plugin-ubique-preset-android.git | ||
|
||
# License information | ||
POM_LICENCE_NAME=License | ||
POM_LICENCE_URL=https://github.com/UbiqueInnovation/gradle-plugin-ubique-preset-android/blob/main/LICENSE | ||
POM_LICENCE_DIST=repo | ||
|
||
# Developer information | ||
POM_DEVELOPER_ID=UbiqueInnovation | ||
POM_DEVELOPER_NAME=Ubique Innovation | ||
POM_DEVELOPER_URL=https://www.ubique.ch/ | ||
|
||
# Sonatype metadata | ||
SONATYPE_STAGING_PROFILE=ch.ubique |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,48 @@ | ||
import com.vanniktech.maven.publish.GradlePublishPlugin | ||
import com.vanniktech.maven.publish.SonatypeHost | ||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
plugins { | ||
kotlin("jvm") | ||
`java-gradle-plugin` | ||
alias(libs.plugins.pluginPublish) | ||
alias(libs.plugins.jfrog.artifactory) | ||
kotlin("jvm") | ||
`java-gradle-plugin` | ||
alias(libs.plugins.pluginPublish) | ||
alias(libs.plugins.vanniktech) | ||
} | ||
|
||
dependencies { | ||
implementation(kotlin("stdlib")) | ||
implementation(gradleApi()) | ||
implementation(kotlin("stdlib")) | ||
implementation(gradleApi()) | ||
|
||
implementation(libs.agp) | ||
implementation(libs.kotlin.gradle) | ||
implementation(libs.agp) | ||
implementation(libs.kotlin.gradle) | ||
|
||
implementation(libs.coroutines) | ||
implementation(libs.okhttp) | ||
implementation(libs.retrofit) | ||
implementation(libs.retrofitConverterScalars) | ||
implementation(libs.moshi) | ||
implementation(libs.moshiKotlin) | ||
implementation(libs.moshiAdapters) | ||
|
||
testImplementation(libs.junit) | ||
testImplementation(libs.junit) | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} | ||
|
||
tasks.withType<KotlinCompile> { | ||
compilerOptions.jvmTarget = JvmTarget.JVM_17 | ||
kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString() | ||
compilerOptions.jvmTarget = JvmTarget.JVM_17 | ||
kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString() | ||
} | ||
|
||
gradlePlugin { | ||
plugins { | ||
create(property("ID").toString()) { | ||
id = property("ID").toString() | ||
implementationClass = property("IMPLEMENTATION_CLASS").toString() | ||
version = project.version | ||
description = property("DESCRIPTION").toString() | ||
displayName = property("DISPLAY_NAME").toString() | ||
tags = listOf("android", "ubique") | ||
} | ||
} | ||
website.set(property("WEBSITE").toString()) | ||
vcsUrl.set(property("VCS_URL").toString()) | ||
plugins { | ||
create(property("ID").toString()) { | ||
id = property("ID").toString() | ||
implementationClass = property("IMPLEMENTATION_CLASS").toString() | ||
version = project.version | ||
} | ||
} | ||
} | ||
|
||
tasks.create("setupPluginUploadFromEnvironment") { | ||
doLast { | ||
val key = System.getenv("GRADLE_PUBLISH_KEY") | ||
val secret = System.getenv("GRADLE_PUBLISH_SECRET") | ||
if (key == null || secret == null) { | ||
throw GradleException("GRADLE_PUBLISH_KEY and/or GRADLE_PUBLISH_SECRET are not defined environment variables") | ||
} | ||
System.setProperty("gradle.publish.key", key) | ||
System.setProperty("gradle.publish.secret", secret) | ||
} | ||
mavenPublishing { | ||
configure(GradlePublishPlugin()) | ||
coordinates(property("GROUP").toString(), property("ARTIFACT_ID").toString(), project.version.toString()) | ||
publishToMavenCentral(SonatypeHost.S01, true) | ||
signAllPublications() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters