Skip to content

Commit 33cde40

Browse files
committed
build.gradle updated.
1 parent 5ffeb3b commit 33cde40

File tree

4 files changed

+11
-20
lines changed

4 files changed

+11
-20
lines changed

build.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,9 @@ plugins {
3939
/** Version Settings, loaded from file `version.properties` */
4040
def version = new Properties()
4141
version.load(new FileInputStream(rootProject.file('version.properties')))
42-
project.ext.set('applicationId', version['applicationId'])
4342
project.ext.set('versionName', version['versionName'])
4443
project.ext.set('versionCode', new Integer(version['versionCode']))
4544

46-
/** TODO: better should load the versionName from git tag */
47-
4845
/* JitPack: use tag as versionName. */
4946
if (System.env.JITPACK) {
5047
project.ext.set('versionName', System.env.VERSION)

library/build.gradle

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,24 @@ plugins {
55

66
android {
77
namespace 'io.syslogic.github.api'
8+
buildToolsVersion = '34.0.0'
89
compileSdk 34
9-
1010
defaultConfig {
1111
minSdk 22
1212
targetSdk 34
13+
setProperty("archivesBaseName", "androidx_github_" + versionName)
1314
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1415
consumerProguardFiles "consumer-rules.pro"
1516

1617
javaCompileOptions {
1718
annotationProcessorOptions {
18-
arguments = ["room.schemaLocation": "$rootDir/schema".toString()]
19+
arguments = [ "room.schemaLocation": "$rootDir/schema".toString() ]
1920
}
2021
}
2122
}
2223

24+
sourceSets.main.java.srcDirs = [ "src/main/java" ]
25+
2326
compileOptions {
2427
sourceCompatibility JavaVersion.VERSION_17
2528
targetCompatibility JavaVersion.VERSION_17
@@ -104,14 +107,14 @@ tasks.register('javadoc', Javadoc) {
104107
// javadoc: warning - The code being documented uses modules but the packages
105108
// defined in https://developer.android.com/reference/ are in the unnamed module.
106109
options.links "https://docs.oracle.com/en/java/javase/17/docs/api/"
107-
options.linksOffline "https://developer.android.com/reference", "${android.sdkDirectory}/docs/reference"
110+
// options.linksOffline "https://developer.android.com/reference", "${android.sdkDirectory}/docs/reference"
108111
options.linkSource true
109112
options.author true
110113

111114
doFirst {
112115

113116
// extract AAR files
114-
configurations.implementation.filter { it.name.endsWith('.aar') }.each { aar ->
117+
configurations.named("implementation").filter { it.name.endsWith('.aar') }.each { aar ->
115118
copy {
116119
from zipTree(aar)
117120
include "**/classes.jar"

mobile/build.gradle

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ plugins {
55
}
66

77
android {
8-
8+
namespace 'io.syslogic.github'
9+
buildToolsVersion = '34.0.0'
910
compileSdk 34
1011
defaultConfig {
11-
applicationId rootProject.ext.get('applicationId')
12-
namespace rootProject.ext.get('applicationId')
12+
applicationId 'io.syslogic.github'
1313
versionName rootProject.ext.get('versionName')
1414
versionCode rootProject.ext.get('versionCode')
1515
manifestPlaceholders = [ accessToken: "" ]
@@ -19,12 +19,6 @@ android {
1919
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2020
testBuildType "debug"
2121
multiDexEnabled true
22-
23-
javaCompileOptions {
24-
annotationProcessorOptions {
25-
arguments = ["room.schemaLocation": "$rootDir/schema".toString()]
26-
}
27-
}
2822
}
2923

3024
compileOptions {
@@ -123,9 +117,7 @@ dependencies {
123117
androidTestImplementation "androidx.fragment:fragment-testing:$fragment_version"
124118
implementation "androidx.fragment:fragment:$fragment_version"
125119

126-
// Room
127-
annotationProcessor "androidx.room:room-compiler:$room_version"
128-
testImplementation "androidx.room:room-testing:$room_version"
120+
// Room Runtime
129121
implementation "androidx.room:room-runtime:$room_version"
130122

131123
// Retrofit2

version.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
applicationId = io.syslogic.github
21
versionName = 1.0.0
32
versionCode = 1

0 commit comments

Comments
 (0)