File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 types : [created]
66
77jobs :
8- build :
9- runs-on : ubuntu-latest
10- timeout-minutes : 30
11- permissions :
12- contents : read
13- packages : write
14-
8+ publish :
9+ name : Release build and publish
10+ runs-on : macOS-latest
1511 steps :
16- - name : Checkout
12+ - name : Check out code
1713 uses : actions/checkout@v4
1814
19- - name : Set up JDK
15+ - name : Set up JDK 21
2016 uses : actions/setup-java@v4
2117 with :
22- distribution : ' temurin '
23- java-version : ' 21 '
18+ distribution : ' zulu '
19+ java-version : 21
2420
25- - name : Run unit tests
26- uses : gradle/gradle-build-action@v3
27- with :
28- arguments : testDebugUnitTest
21+ - name : Setup Gradle
22+ uses : gradle/gradle-build-action@v2
2923
30- - name : Publish
31- uses : gradle/gradle-build-action@v3
32- with :
33- arguments : publish
24+ - name : Run Unit Tests
25+ run : ./gradlew testDebugUnitTest
26+
27+ - name : Publish Medusa to MavenCentral
28+ run : ./gradlew :medusalib:publishAndReleaseToMavenCentral --no-configuration-cache
3429 env :
35- SIGNING_KEY : ${{ secrets.SONARTYPE_GPG_PRIVATE_KEY }}
36- SIGNING_PASSWORD : ${{ secrets.SONARTYPE_GPG_PASSPHRASE }}
37- OSSRH_TOKEN : ${{ secrets.SONATYPE_TOKEN }}
38- OSSRH_TOKEN_PASSWORD : ${{ secrets.SONATYPE_TOKEN_PASSWORD }}
39- SONATYPE_STAGING_PROFILE_ID : ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
40- SIGNING_KEY_ID : ${{ secrets.SONATYPE_SIGNING_KEY_ID }}
30+ ORG_GRADLE_PROJECT_mavenCentralUsername : ${{ secrets.SONARTYPE_USERNAME }}
31+ ORG_GRADLE_PROJECT_mavenCentralPassword : ${{ secrets.SONARTYPE_PASSWORD }}
32+ ORG_GRADLE_PROJECT_signingInMemoryKeyId : ${{ secrets.SIGNING_KEY_ID }}
33+ ORG_GRADLE_PROJECT_signingInMemoryKeyPassword : ${{ secrets.SIGNING_PASSWORD }}
34+ ORG_GRADLE_PROJECT_signingInMemoryKey : ${{ secrets.GPG_KEY_CONTENTS }}
Load diff This file was deleted.
Original file line number Diff line number Diff line change 1+ plugins {
2+ alias(libs.plugins.android.application)
3+ alias(libs.plugins.kotlin.android)
4+ }
5+
6+ java.toolchain.languageVersion = JavaLanguageVersion .of(21 )
7+
8+ android {
9+ namespace = " com.trendyol.medusa"
10+ compileSdk = 34
11+
12+
13+ defaultConfig {
14+ applicationId = " com.trendyol.medusa"
15+ minSdk = 21
16+ versionCode = 1
17+ versionName = " 1.0"
18+ testInstrumentationRunner = " androidx.test.runner.AndroidJUnitRunner"
19+ }
20+
21+ buildTypes {
22+ release {
23+ isMinifyEnabled = false
24+ proguardFiles(
25+ getDefaultProguardFile(" proguard-android.txt" ),
26+ " proguard-rules.pro"
27+ )
28+ }
29+ }
30+
31+ testOptions {
32+ unitTests {
33+ isIncludeAndroidResources = true
34+ }
35+ }
36+ }
37+
38+ dependencies {
39+ implementation(projects.medusalib)
40+ implementation(libs.androidXAppCompat)
41+ implementation(libs.androidXConstraintLayout)
42+ implementation(libs.androidXVectorDrawable)
43+ implementation(libs.googleMaterial)
44+ implementation(libs.kotlinStdLib)
45+ testImplementation(libs.androidXArchCoreTesting)
46+ testImplementation(libs.androidXTestCoreKtx)
47+ testImplementation(libs.androidXTestExtJunit)
48+ testImplementation(libs.junit)
49+ testImplementation(libs.robolectric)
50+ }
Original file line number Diff line number Diff line change 11# Add project specific ProGuard rules here.
22# You can control the set of applied configuration files using the
3- # proguardFiles setting in build.gradle.
3+ # proguardFiles setting in build.gradle.kts.
44#
55# For more details, see
66# http://developer.android.com/guide/developing/tools/proguard.html
Load diff This file was deleted.
Original file line number Diff line number Diff line change 1+ // Top-level build file where you can add configuration options common to all sub-projects/modules.
2+ plugins {
3+ alias(libs.plugins.android.application) apply false
4+ alias(libs.plugins.android.library) apply false
5+ alias(libs.plugins.kotlin.android) apply false
6+ alias(libs.plugins.kotlin.parcelize) apply false
7+ alias(libs.plugins.maven.publish) apply false
8+ }
Original file line number Diff line number Diff line change 1+ [versions ]
2+ agp = " 8.10.1"
3+ kotlin = " 2.1.20"
4+
15[libraries ]
26androidGradlePlugin = " com.android.tools.build:gradle:8.5.0"
37androidXAppCompat = " androidx.appcompat:appcompat:1.1.0"
@@ -19,5 +23,9 @@ robolectric = "org.robolectric:robolectric:4.12.2"
1923truth = " com.google.truth:truth:1.4.2"
2024espressoTest = " androidx.test.espresso:espresso-core:3.6.0"
2125
22- [versions ]
23- kotlin = " 2.0.0"
26+ [plugins ]
27+ android-application = { id = " com.android.application" , version.ref = " agp" }
28+ android-library = { id = " com.android.library" , version.ref = " agp" }
29+ maven-publish = { id = " com.vanniktech.maven.publish" , version = " 0.33.0" }
30+ kotlin-parcelize = { id = " org.jetbrains.kotlin.plugin.parcelize" , version.ref = " kotlin" }
31+ kotlin-android = { id = " org.jetbrains.kotlin.android" , version.ref = " kotlin" }
Original file line number Diff line number Diff line change 11distributionBase =GRADLE_USER_HOME
22distributionPath =wrapper/dists
3- distributionUrl =https\://services.gradle.org/distributions/gradle-8.8 -bin.zip
3+ distributionUrl =https\://services.gradle.org/distributions/gradle-8.14.3 -bin.zip
44networkTimeout =10000
55validateDistributionUrl =true
66zipStoreBase =GRADLE_USER_HOME
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments