1buildscript { 2 repositories { 3 mavenCentral() 4 google() 5 } 6 dependencies { 7 classpath 'com.android.tools.build:gradle:3.5.4' 8 classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.14' 9 classpath 'digital.wup:android-maven-publish:3.6.3' 10 } 11} 12 13 14allprojects { 15 repositories { 16 mavenCentral() 17 google() 18 } 19} 20 21apply plugin: 'com.android.library' 22 23android { 24 compileSdkVersion 34 25 buildToolsVersion '29.0.3' 26 defaultConfig { 27 minSdkVersion 19 28 targetSdkVersion 34 29 } 30 lintOptions { 31 abortOnError false 32 } 33 compileOptions { 34 targetCompatibility 1.8 35 sourceCompatibility 1.8 36 } 37} 38 39apply plugin: 'com.google.protobuf' 40 41protobuf { 42 protoc { 43 artifact = 'com.google.protobuf:protoc:3.19.1' 44 } 45 generateProtoTasks { 46 all().each { task -> 47 task.builtins { 48 java { 49 option "lite" 50 } 51 } 52 } 53 } 54} 55 56// Creates the source jar for release to maven central. 57task sourceJar(type: Jar) { 58 classifier "sources" 59 from android.sourceSets.main.java.srcDirs 60} 61 62// Creates javadoc for the project. 63task javadoc(type: Javadoc) { 64 source = android.sourceSets.main.java.srcDirs 65 failOnError false // Currently cannot import android sdk javadoc references so we ignore errors. 66} 67 68// Creates the source javadoc jar for release to maven central. 69task javadocJar(type: Jar) { 70 classifier "javadoc" 71 from javadoc 72} 73apply plugin: 'digital.wup.android-maven-publish' 74apply plugin: 'maven-publish' 75 76// Creates the artifacts for release to maven central. 77publishing { 78 publications { 79 mavenAar(MavenPublication) { 80 groupId 'com.google.android.apps.common.testing.accessibility.framework' 81 artifactId 'accessibility-test-framework' 82 version '4.1.0' 83 from components.android 84 artifact sourceJar 85 artifact javadocJar 86 pom { 87 name = 'Accessibility Test Framework' 88 description = 'Library used to test for common accessibility issues.' 89 url = 'https://github.com/google/Accessibility-Test-Framework-for-Android' 90 licenses { 91 license { 92 name = 'The Apache License, Version 2.0' 93 url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' 94 distribution = 'repo' 95 } 96 } 97 developers { 98 developer { 99 name = 'Casey Burkhardt' 100 email = '[email protected]' 101 organization = 'Google LLC' 102 organizationUrl = 'https://www.google.com' 103 } 104 } 105 scm { 106 connection = 'scm:git:[email protected]:google/Accessibility-Test-Framework-for-Android.git' 107 developerConnection = 'scm:git:[email protected]:google/Accessibility-Test-Framework-for-Android.git' 108 url = 'https://github.com/google/Accessibility-Test-Framework-for-Android' 109 } 110 } 111 } 112 } 113} 114 115dependencies { 116 implementation 'androidx.core:core:1.8.0' 117 implementation 'androidx.test.services:storage:1.4.1' 118 implementation 'androidx.test.espresso:espresso-core:3.4.0' 119 implementation 'androidx.test:runner:1.4.0' 120 implementation 'androidx.test:rules:1.4.0' 121 implementation 'com.google.android.material:material:1.2.0-rc01' 122 implementation 'com.google.errorprone:error_prone_annotations:2.14.0' 123 implementation 'com.google.guava:guava:31.0.1-android' 124 implementation 'com.google.protobuf:protobuf-javalite:3.19.1' 125 // use same version of checker framework used in guava android, 126 // to avoid duplicate class and dexing errors 127 // see https://github.com/android/android-test/issues/861 128 implementation 'org.checkerframework:checker-qual:3.22.1' 129 implementation 'org.hamcrest:hamcrest-core:2.2' 130 implementation 'org.hamcrest:hamcrest-library:2.2' 131 implementation 'org.jsoup:jsoup:1.15.1' 132 compileOnly 'com.google.auto.value:auto-value-annotations:1.6.2' 133 annotationProcessor 'com.google.auto.value:auto-value:1.6.2' 134} 135 136clean { 137 delete 'src/main/generated' 138} 139