Skip to content

Commit

Permalink
Update Gradle and Dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
FarshidRoohi committed Aug 18, 2021
1 parent 12def42 commit 8f105b0
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 86 deletions.
14 changes: 6 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.3.61'

ext.kotlin_version = '1.5.21'

repositories {
google()
jcenter()

mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.2'
classpath 'com.android.tools.build:gradle:7.0.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath "com.github.dcendents:android-maven-gradle-plugin:2.1"
}
}

allprojects {
repositories {
google()
jcenter()

mavenCentral()
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
70 changes: 5 additions & 65 deletions linegraph/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'maven-publish'

android {
compileSdkVersion 29
compileSdkVersion 30
defaultConfig {
minSdkVersion 14
targetSdkVersion 29
versionCode 1
versionName "1.0"
targetSdkVersion 30

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
Expand All @@ -28,65 +24,9 @@ android {

}


task generateSourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier 'sources'
}

task generateJavadocs(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath()
.join(File.pathSeparator))
}

task generateJavadocsJar(type: Jar) {
from generateJavadocs.destinationDir
classifier 'javadoc'
}

generateJavadocsJar.dependsOn generateJavadocs

artifacts {
archives generateJavadocsJar
archives generateSourcesJar
}
tasks.withType(Javadoc).all {
enabled = false
}
group = 'ir.farshid_roohi'
version = '0.1.3'

bintray {
user = 'xxxx'
key = 'xxxx'
pkg {

repo = 'LineGraph'
name = 'LineGraph'
userOrg = ''

version {
name = '0.1.3'
desc = 'Line Graph Android'
released = new Date()
vcsTag = '0.1.3'
}

licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/FarshidRoohi/LineGraph'
websiteUrl = 'http://farshid-roohi.ir'
}
configurations = ['archives']
}


dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.core:core-ktx:1.6.0'
}
16 changes: 5 additions & 11 deletions sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 29
compileSdkVersion 30
defaultConfig {
applicationId "ir.farshid_roohi.graph"
minSdkVersion 14
targetSdkVersion 29
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -25,13 +22,10 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.1.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.core:core-ktx:1.6.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'

implementation project(":linegraph")
}
3 changes: 2 additions & 1 deletion sample/src/main/java/ir/farshid_roohi/graph/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import ir.farshid_roohi.linegraph.ChartEntity
import ir.farshid_roohi.linegraph.LineChart
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : AppCompatActivity() {

Expand All @@ -20,6 +19,8 @@ class MainActivity : AppCompatActivity() {
add(firstChartEntity)
add(secondChartEntity)
}

val lineChart = findViewById<LineChart>(R.id.lineChart)
lineChart.setLegend(legendArr)
lineChart.setList(list)
}
Expand Down

0 comments on commit 8f105b0

Please sign in to comment.