Skip to content

Commit

Permalink
upgrade to gradle 8 (#6)
Browse files Browse the repository at this point in the history
* upgrade to gradle 8.4

* code clean
  • Loading branch information
kukadiajayesh authored Jun 14, 2024
1 parent 0353c36 commit 53ac74b
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 90 deletions.
10 changes: 7 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
buildscript {
ext {
kotlin_version = "1.8.0"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath('com.android.tools.build:gradle:7.4.2')
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21")
classpath('com.android.tools.build:gradle:8.5.0')
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}")
}
}

allprojects {
repositories {
google()
maven { url "https://jitpack.io" }
mavenCentral()
}
}
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
43 changes: 0 additions & 43 deletions library/api/library.api

This file was deleted.

46 changes: 10 additions & 36 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ plugins {
id("com.android.library")
id("kotlin-android")
id("maven-publish")
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.13.2"
}

android {
compileSdk 34

defaultConfig {
minSdkVersion(16)
minSdkVersion(21)
targetSdkVersion(34)
consumerProguardFiles("consumer-proguard-rules.pro")
setProperty("archivesBaseName", "com.mikashboks.sequencelayout-${versionName}")
Expand All @@ -23,63 +22,38 @@ android {
}

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

kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
jvmTarget = JavaVersion.VERSION_17.toString()
}

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(JavaVersion.VERSION_11.toString()))
languageVersion.set(JavaLanguageVersion.of(JavaVersion.VERSION_17.toString()))
}
}

namespace 'com.mikashboks.sequencelayout'
}

ext {
PUBLISH_GROUP_ID = "com.github.mikashboks"
PUBLISH_ARTIFACT_ID = "sequence-layout"
PUBLISH_VERSION = "1.2.1"
}

group = PUBLISH_GROUP_ID
version = PUBLISH_VERSION

afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release

groupId = PUBLISH_GROUP_ID
artifactId = PUBLISH_ARTIFACT_ID
version = PUBLISH_VERSION

pom {
name = PUBLISH_ARTIFACT_ID
url = "https://github.com/mikashboks/mkb-sequence-layout"
licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
scm {
connection = "scm:git:github.com/mikashboks/mkb-sequence-layout.git"
developerConnection = "scm:git:ssh://github.com/mikashboks/mkb-sequence-layout.git"
url = "https://github.com/mikashboks/mkb-sequence-layout/tree/master"
}
}
groupId "com.github.mikashboks"
artifactId "sequence-layout"
version "1.4.0"
}
}
}
}

dependencies {
implementation("androidx.appcompat:appcompat:1.6.0")
implementation("androidx.core:core-ktx:1.8.0")
implementation("androidx.appcompat:appcompat:1.7.0")
implementation("androidx.core:core-ktx:1.13.1")
}
12 changes: 6 additions & 6 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@ plugins {
android {
compileSdk 34
defaultConfig {
minSdkVersion(16)
minSdkVersion(21)
targetSdkVersion(34)
applicationId = "com.mikashboks.sequencelayout.sample"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
jvmTarget = JavaVersion.VERSION_17.toString()
}
kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(JavaVersion.VERSION_11.toString()))
languageVersion.set(JavaLanguageVersion.of(JavaVersion.VERSION_17.toString()))
}
}
namespace 'com.mikashboks.sequencelayout.sample'
}

dependencies {
implementation(project(":library"))
implementation("androidx.appcompat:appcompat:1.6.0")
implementation("androidx.appcompat:appcompat:1.7.0")
}
3 changes: 2 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
include ":library", ":sample"
rootProject.name = "MkbSequenceLayout"
include ":library", ":sample"

0 comments on commit 53ac74b

Please sign in to comment.