diff --git a/build.gradle b/build.gradle index 53f4fad6..f11d614a 100644 --- a/build.gradle +++ b/build.gradle @@ -3,9 +3,13 @@ buildscript { repositories { jcenter() + maven { + url 'https://maven.google.com/' + name 'Google' + } } dependencies { - classpath 'com.android.tools.build:gradle:2.2.1' + classpath 'com.android.tools.build:gradle:7.4.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -15,6 +19,10 @@ buildscript { allprojects { repositories { jcenter() + maven { + url 'https://maven.google.com/' + name 'Google' + } } } diff --git a/demo/build.gradle b/demo/build.gradle index bdf1771b..2fe4ad07 100644 --- a/demo/build.gradle +++ b/demo/build.gradle @@ -1,13 +1,13 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 23 - buildToolsVersion "21.1.2" + compileSdkVersion 33 + buildToolsVersion "34.0.0" defaultConfig { applicationId "tileview.demo" - minSdkVersion 11 - targetSdkVersion 23 + minSdkVersion 21 + targetSdkVersion 33 versionCode 1 versionName "1.0" } @@ -23,9 +23,9 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - testCompile 'junit:junit:4.12' - compile 'com.android.support:appcompat-v7:23.2.1' - compile 'com.squareup.picasso:picasso:2.5.2' - compile project(':tileview') + testImplementation 'junit:junit:4.12' + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation project(':tileview') + implementation 'com.android.support:appcompat-v7:26.1.0' + implementation 'com.squareup.picasso:picasso:2.5.2' } diff --git a/demo/src/main/AndroidManifest.xml b/demo/src/main/AndroidManifest.xml index 3c8bc923..f5bdbe17 100644 --- a/demo/src/main/AndroidManifest.xml +++ b/demo/src/main/AndroidManifest.xml @@ -9,18 +9,18 @@ android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme" > - + - - - - - + + + + + diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 6cac8b4e..0ec85b22 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Oct 26 20:44:34 CDT 2016 +#Wed Oct 25 10:22:11 CEST 2023 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip diff --git a/tileview/aar-release.gradle b/tileview/aar-release.gradle index b72b5858..e54ccaf8 100644 --- a/tileview/aar-release.gradle +++ b/tileview/aar-release.gradle @@ -1,55 +1,55 @@ -// credit https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle -// run ./gradlew clean build generateRelease - -apply plugin: 'maven' - -def groupId = 'com.qozix' -def artifactId = 'tileview' -def version = android.defaultConfig.versionName - -def localReleaseDest = "${buildDir}/release/${version}" - -task androidJavadocs(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - ext.androidJar = "${android.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar" - classpath += files(ext.androidJar) -} - -task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) { - classifier = 'javadoc' - from androidJavadocs.destinationDir -} - -task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs -} - -uploadArchives { - repositories.mavenDeployer { - pom.groupId = groupId - pom.artifactId = artifactId - pom.version = version - // Add other pom properties here if you want (developer details / licenses) - repository(url: "file://${localReleaseDest}") - } -} - -task zipRelease(type: Zip) { - from localReleaseDest - destinationDir buildDir - archiveName "release-${version}.zip" -} - -task generateRelease << { - println "Release ${version} can be found at ${localReleaseDest}/" - println "Release ${version} zipped can be found ${buildDir}/release-${version}.zip" -} - -generateRelease.dependsOn(uploadArchives) -generateRelease.dependsOn(zipRelease) - -artifacts { - archives androidSourcesJar - //archives androidJavadocsJar -} \ No newline at end of file +//// credit https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle +//// run ./gradlew clean build generateRelease +// +//apply plugin: 'maven-publish' +// +//def groupId = 'com.qozix' +//def artifactId = 'tileview' +//def version = android.defaultConfig.versionName +// +//def localReleaseDest = "${buildDir}/release/${version}" +// +//task androidJavadocs(type: Javadoc) { +// source = android.sourceSets.main.java.srcDirs +// ext.androidJar = "${android.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar" +// classpath += files(ext.androidJar) +//} +// +//task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) { +// classifier = 'javadoc' +// from androidJavadocs.destinationDir +//} +// +//task androidSourcesJar(type: Jar) { +// classifier = 'sources' +// from android.sourceSets.main.java.srcDirs +//} +// +////uploadArchives { +//// repositories.mavenDeployer { +//// pom.groupId = groupId +//// pom.artifactId = artifactId +//// pom.version = version +//// // Add other pom properties here if you want (developer details / licenses) +//// repository(url: "file://${localReleaseDest}") +//// } +////} +// +//task zipRelease(type: Zip) { +// from localReleaseDest +// destinationDir buildDir +// archiveName "release-${version}.zip" +//} +// +////task generateRelease << { +//// println "Release ${version} can be found at ${localReleaseDest}/" +//// println "Release ${version} zipped can be found ${buildDir}/release-${version}.zip" +////} +// +////generateRelease.dependsOn(uploadArchives) +////generateRelease.dependsOn(zipRelease) +// +//artifacts { +// archives androidSourcesJar +// //archives androidJavadocsJar +//} \ No newline at end of file diff --git a/tileview/build.gradle b/tileview/build.gradle index 566190db..541d6a23 100644 --- a/tileview/build.gradle +++ b/tileview/build.gradle @@ -1,13 +1,13 @@ -apply plugin: 'com.android.library' +plugins { + id 'com.android.library' + id 'maven-publish' +} android { - compileSdkVersion 23 - buildToolsVersion "21.1.2" + compileSdk 34 defaultConfig { - minSdkVersion 11 - targetSdkVersion 23 - versionCode 40 - versionName "2.2.9" + minSdkVersion 21 + targetSdkVersion 34 } buildTypes { release { @@ -21,9 +21,54 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - testCompile 'junit:junit:4.12' - compile 'com.android.support:appcompat-v7:23.2.1' + testImplementation 'junit:junit:4.12' + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation 'com.android.support:appcompat-v7:23.2.1' } -apply from: 'aar-release.gradle' +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + from components.release + + groupId = 'com.github.smartapps-fr' + artifactId = 'tileview' + version = '1.0.0' + + pom { + packaging 'aar' + groupId 'com.github.smartapps-fr' + artifactId 'tileview' + + // Add your description here + name = 'tileview' + description = 'TileView fork to maintain Smartapps libraries' + url = 'https://smartapps.fr/' + + // Set your license + licenses { + license { + name = 'The Apache Software License, Version 2.0' + url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' + } + } + developers { + developer { + id = 'smartapps' + name = 'Smartapps' + email = 'dd@smartapps.fr' + } + } + scm { + connection = 'https://github.com/smartapps-fr/tileview.git' + developerConnection = 'https://github.com/smartapps-fr/tileview.git' + tag = '1.0.0' + url = 'https://github.com/smartapps-fr/tileview.git' + + } + } + } + } + } +}