Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/sdk-build-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y wget
wget https://download.swift.org/swift-5.9.2-release/ubuntu2204/swift-5.9.2-RELEASE/swift-5.9.2-RELEASE-ubuntu22.04.tar.gz
tar xzf swift-5.9.2-RELEASE-ubuntu22.04.tar.gz
sudo mv swift-5.9.2-RELEASE-ubuntu22.04 /usr/share/swift
wget https://download.swift.org/swift-6.0.3-release/ubuntu2204/swift-6.0.3-RELEASE/swift-6.0.3-RELEASE-ubuntu22.04.tar.gz
tar xzf swift-6.0.3-RELEASE-ubuntu22.04.tar.gz
sudo mv swift-6.0.3-RELEASE-ubuntu22.04 /usr/share/swift
echo "/usr/share/swift/usr/bin" >> $GITHUB_PATH

- name: Setup Java
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:
FlutterBeta,
Go112,
Go118,
KotlinJava8,
KotlinJava11,
KotlinJava17,
Node16,
Node18,
Expand Down
26 changes: 8 additions & 18 deletions src/SDK/Language/Android.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,15 @@ public function getFiles(): array
'destination' => 'gradle/wrapper/gradle-wrapper.properties',
'template' => '/android/gradle/wrapper/gradle-wrapper.properties',
],
[
'scope' => 'copy',
'destination' => 'scripts/publish-config.gradle',
'template' => '/android/scripts/publish-config.gradle',
],
[
'scope' => 'copy',
'destination' => 'scripts/publish-module.gradle',
'template' => '/android/scripts/publish-module.gradle',
],
[
'scope' => 'copy',
'destination' => '.gitignore',
'template' => '/android/.gitignore',
],
[
'scope' => 'default',
'destination' => 'build.gradle',
'template' => '/android/build.gradle.twig',
'destination' => 'build.gradle.kts',
'template' => '/android/build.gradle.kts.twig',
],
[
'scope' => 'default',
Expand Down Expand Up @@ -96,8 +86,8 @@ public function getFiles(): array
],
[
'scope' => 'copy',
'destination' => 'settings.gradle',
'template' => '/android/settings.gradle',
'destination' => 'settings.gradle.kts',
'template' => '/android/settings.gradle.kts',
],
// Config for project :library
[
Expand Down Expand Up @@ -237,8 +227,8 @@ public function getFiles(): array
],
[
'scope' => 'default',
'destination' => '/library/build.gradle',
'template' => '/android/library/build.gradle.twig',
'destination' => '/library/build.gradle.kts',
'template' => '/android/library/build.gradle.kts.twig',
],
[
'scope' => 'copy',
Expand Down Expand Up @@ -343,8 +333,8 @@ public function getFiles(): array
],
[
'scope' => 'default',
'destination' => '/example/build.gradle',
'template' => '/android/example/build.gradle.twig',
'destination' => '/example/build.gradle.kts',
'template' => '/android/example/build.gradle.kts.twig',
],
[
'scope' => 'copy',
Expand Down
23 changes: 4 additions & 19 deletions src/SDK/Language/Kotlin.php
Original file line number Diff line number Diff line change
Expand Up @@ -513,30 +513,15 @@ public function getFiles(): array
'destination' => 'gradle/wrapper/gradle-wrapper.properties',
'template' => '/kotlin/gradle/wrapper/gradle-wrapper.properties',
],
[
'scope' => 'copy',
'destination' => 'scripts/configure.gradle',
'template' => '/kotlin/scripts/configure.gradle',
],
[
'scope' => 'copy',
'destination' => 'scripts/publish.gradle',
'template' => '/kotlin/scripts/publish.gradle',
],
[
'scope' => 'copy',
'destination' => 'scripts/setup.gradle',
'template' => '/kotlin/scripts/setup.gradle',
],
[
'scope' => 'copy',
'destination' => '.gitignore',
'template' => '/kotlin/.gitignore',
],
[
'scope' => 'default',
'destination' => 'build.gradle',
'template' => '/kotlin/build.gradle.twig',
'destination' => 'build.gradle.kts',
'template' => '/kotlin/build.gradle.kts.twig',
],
[
'scope' => 'default',
Expand Down Expand Up @@ -570,8 +555,8 @@ public function getFiles(): array
],
[
'scope' => 'default',
'destination' => 'settings.gradle',
'template' => '/kotlin/settings.gradle.twig',
'destination' => 'settings.gradle.kts',
'template' => '/kotlin/settings.gradle.kts.twig',
],
[
'scope' => 'default',
Expand Down
43 changes: 43 additions & 0 deletions templates/android/build.gradle.kts.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import java.util.Properties

plugins {
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
id("com.android.library") version "9.1.1" apply false
id("com.android.application") version "9.1.1" apply false
}

version = System.getenv("SDK_VERSION") ?: "0.0.0"

tasks.register<Delete>("clean") {
delete(rootProject.layout.buildDirectory)
}

val signingKeyId: String = System.getenv("SIGNING_KEY_ID") ?: ""
val signingPassword: String = System.getenv("SIGNING_PASSWORD") ?: ""
val signingSecretKeyRingFile: String = System.getenv("SIGNING_SECRET_KEY_RING_FILE") ?: ""
val ossrhUsername: String = System.getenv("OSSRH_USERNAME") ?: ""
val ossrhPassword: String = System.getenv("OSSRH_PASSWORD") ?: ""
val sonatypeStagingProfileId: String = System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: ""

val secretPropsFile = project.rootProject.file("local.properties")
val localProperties = Properties().apply {
if (secretPropsFile.exists()) {
secretPropsFile.inputStream().use { load(it) }
}
}

extra["signing.keyId"] = signingKeyId.ifEmpty { localProperties.getProperty("signing.keyId", "") }
extra["signing.password"] = signingPassword.ifEmpty { localProperties.getProperty("signing.password", "") }
extra["signing.secretKeyRingFile"] = signingSecretKeyRingFile.ifEmpty { localProperties.getProperty("signing.secretKeyRingFile", "") }

nexusPublishing {
repositories {
sonatype {
stagingProfileId.set(sonatypeStagingProfileId.ifEmpty { localProperties.getProperty("sonatypeStagingProfileId", "") })
username.set(ossrhUsername.ifEmpty { localProperties.getProperty("ossrhUsername", "") })
password.set(ossrhPassword.ifEmpty { localProperties.getProperty("ossrhPassword", "") })
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
}
}
}
33 changes: 0 additions & 33 deletions templates/android/build.gradle.twig

This file was deleted.

58 changes: 58 additions & 0 deletions templates/android/example/build.gradle.kts.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
plugins {
id("com.android.application")
}

android {
namespace = "{{ sdk.namespace | caseDot }}.android"

compileSdk = 36

defaultConfig {
applicationId = "{{ sdk.namespace | caseDot }}.android"
minSdk = 21
@Suppress("DEPRECATION")
targetSdk = 36
versionCode = 1
versionName = "1.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildFeatures {
dataBinding = true
}

buildTypes {
release {
isMinifyEnabled = false
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}

dependencies {
implementation(project(":library"))

implementation("androidx.core:core-ktx:1.15.0")
implementation("androidx.appcompat:appcompat:1.7.0")
implementation("com.google.android.material:material:1.12.0")
implementation("androidx.constraintlayout:constraintlayout:2.2.0")
implementation("androidx.navigation:navigation-fragment-ktx:2.8.5")
implementation("androidx.fragment:fragment-ktx:1.8.5")
implementation("androidx.navigation:navigation-ui-ktx:2.8.5")
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.8.7")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2")

implementation(platform("com.google.firebase:firebase-bom:33.7.0"))
implementation("com.google.firebase:firebase-messaging")

testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.2.1")
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
}
65 changes: 0 additions & 65 deletions templates/android/example/build.gradle.twig

This file was deleted.

5 changes: 2 additions & 3 deletions templates/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Tue Jun 01 15:55:54 IST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading