Skip to content

Commit 42eb772

Browse files
committed
Copy gradle things from branch Issue#19
This is mainly a update of gradle itself and new build files. Build files are not working as the current structure is not the same as `Issue#19`.
1 parent 4cafa3d commit 42eb772

7 files changed

Lines changed: 103 additions & 55 deletions

File tree

build.gradle

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,39 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2-
32
buildscript {
43
repositories {
54
google()
6-
jcenter()
7-
5+
mavenCentral()
6+
maven { url 'https://plugins.gradle.org/m2/' }
87
}
98
dependencies {
10-
classpath 'com.android.tools.build:gradle:3.4.1'
9+
classpath "com.android.tools.build:gradle:7.0.1"
10+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21"
11+
classpath 'io.github.gradle-nexus:publish-plugin:1.1.0'
12+
classpath 'de.undercouch:gradle-download-task:5.3.0'
1113
// NOTE: Do not place your application dependencies here; they belong
12-
// in the individual module build.gradle files
14+
// in the individual module build.gradle.kts files
1315
}
1416
}
1517

16-
allprojects {
17-
repositories {
18-
google()
19-
jcenter()
20-
}
21-
}
18+
apply plugin: 'io.github.gradle-nexus.publish-plugin'
2219

2320
task clean(type: Delete) {
2421
delete rootProject.buildDir
2522
}
23+
24+
Properties properties = new Properties()
25+
if (rootProject.file("local.properties").exists()) {
26+
properties.load(rootProject.file("local.properties").newDataInputStream())
27+
}
28+
// Publish to Maven Central
29+
nexusPublishing {
30+
repositories {
31+
sonatype {
32+
stagingProfileId = properties.getProperty("sonatypeStagingProfileId", System.getenv('SONATYPE_STAGING_PROFILE_ID'))
33+
username = properties.getProperty("ossrhUsername", System.getenv('OSSRH_USERNAME'))
34+
password = properties.getProperty("ossrhPassword", System.getenv('OSSRH_PASSWORD'))
35+
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
36+
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
37+
}
38+
}
39+
}

gradle.properties

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,18 @@
66
# http://www.gradle.org/docs/current/userguide/build_environment.html
77
# Specifies the JVM arguments used for the daemon process.
88
# The setting is particularly useful for tweaking memory settings.
9-
org.gradle.jvmargs=-Xmx1536m
9+
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
1010
# When configured, Gradle will run in incubating parallel mode.
1111
# This option should only be used with decoupled projects. More details, visit
1212
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1313
# org.gradle.parallel=true
14+
# AndroidX package structure to make it clearer which packages are bundled with the
15+
# Android operating system, and which are packaged with your app"s APK
16+
# https://developer.android.com/topic/libraries/support-library/androidx-rn
17+
android.useAndroidX=true
1418
# Kotlin code style for this project: "official" or "obsolete":
1519
kotlin.code.style=official
20+
# Enables namespacing of each library's R class so that its R class includes only the
21+
# resources declared in the library itself and none from the library's dependencies,
22+
# thereby reducing the size of the R class for that library
23+
android.nonTransitiveRClass=true

gradle/wrapper/gradle-wrapper.jar

4.76 KB
Binary file not shown.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Wed Jun 19 15:28:39 BST 2019
1+
#Fri Aug 12 19:44:15 IST 2022
22
distributionBase=GRADLE_USER_HOME
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
34
distributionPath=wrapper/dists
4-
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
6+
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 33 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 24 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

settings.gradle

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1-
include ':kiwixLibAndroid'
1+
dependencyResolutionManagement {
2+
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
3+
repositories {
4+
google()
5+
mavenCentral()
6+
}
7+
}
8+
rootProject.name = "android-libkiwixbuild"
9+
include ':app'

0 commit comments

Comments
 (0)