diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..2b46bcf --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,34 @@ +name: Deploy + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up JDK + uses: actions/setup-java@v2 + with: + java-version: '17' + distribution: 'adopt' + java-package: 'jdk' + architecture: 'x64' + + - name: Grant execute permission for gradlew + run: chmod +x ./gradlew + + - name: Build with Gradle + run: ./gradlew build + + - name: Deploy to JitPack + run: ./gradlew publish + + - name: Notify deployment success + run: echo "Deployment to JitPack was successful!" diff --git a/JDS-component/build.gradle.kts b/JDS-component/build.gradle.kts index aba2805..0fac1cb 100644 --- a/JDS-component/build.gradle.kts +++ b/JDS-component/build.gradle.kts @@ -1,6 +1,22 @@ plugins { alias(libs.plugins.androidLibrary) alias(libs.plugins.jetbrainsKotlinAndroid) + id("maven-publish") + id("kotlin-parcelize") + id("kotlin-kapt") +} + +afterEvaluate { + publishing { + publications { + register("release", MavenPublication::class) { + from(components["release"]) + version="1.0.2" + artifactId="JDS" + groupId="com.github.jds" + } + } + } } android { diff --git a/build.gradle.kts b/build.gradle.kts index 9e4ae6c..0198630 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,12 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. + +// Top-level build file where you can +// add configuration options common to all sub-projects/modules. +buildscript { + dependencies { + classpath("com.github.dcendents:android-maven-gradle-plugin:2.1") + } +} + plugins { alias(libs.plugins.androidApplication) apply false alias(libs.plugins.jetbrainsKotlinAndroid) apply false