Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Gradle 7.3 and AGP 7.0.2 #159

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 12 additions & 19 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'maven-publish'

buildscript {
Expand All @@ -23,7 +22,6 @@ android {
versionName "0.0.3"
consumerProguardFiles 'proguard-rules.pro'
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}

buildTypes {
Expand All @@ -34,18 +32,27 @@ android {
}
}

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

artifacts {
archives sourcesJar
}

publishing {
publications {
android(MavenPublication) {
groupId 'com.msopentech.thali.toronionproxy.android'
artifactId 'android'
version '0.0.3'
artifact(sourceJar)
artifact(sourcesJar)
artifact("$buildDir/outputs/aar/android-release.aar")
pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
//Iterate over the compile dependencies (we don't want the test ones), adding a <dependency> node for each
configurations.compile.allDependencies.each {
//Iterate over the implementation dependencies (we don't want the test ones), adding a <dependency> node for each
configurations.implementation.allDependencies.each {
if(it.group != null && (it.name != null || "unspecified".equals(it.name)) && it.version != null)
{
def dependencyNode = dependenciesNode.appendNode('dependency')
Expand All @@ -59,11 +66,6 @@ publishing {
}
}

task sourceJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier "source"
}

dependencies {
implementation project(':universal')
implementation 'net.freehaven.tor.control:jtorctl:0.2'
Expand Down Expand Up @@ -98,12 +100,3 @@ task copyPluggableTransports(type: Copy) {
gradle.projectsEvaluated {
preBuild.dependsOn(copyPluggableTransports)
}

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

artifacts {
archives sourcesJar
}
1 change: 0 additions & 1 deletion android_tor_installer/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'maven-publish'

buildscript {
Expand Down
10 changes: 4 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
allprojects {
apply plugin: 'maven'
allprojects {
apply plugin: 'maven-publish'
group = 'com.msopentech.thali'
version = '0.0.3'
}
Expand All @@ -12,7 +12,5 @@ subprojects {
}
}

evaluationDependsOn ":universal"
evaluationDependsOn ":java"


evaluationDependsOn(":universal")
evaluationDependsOn(":java")
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Configure Android Gradle Plugin Version
androidplugin=3.2.1
androidplugin=7.0.2
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion java/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
sourceCompatibility = 1.8
targetCompatibility = 1.8

Expand Down
13 changes: 11 additions & 2 deletions universal/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
sourceCompatibility = 1.8
targetCompatibility = 1.8

Expand All @@ -14,7 +14,7 @@ repositories {
dependencies {
implementation 'org.slf4j:slf4j-api:1.7.25'
implementation 'net.freehaven.tor.control:jtorctl:0.2'
testCompile group: 'junit', name: 'junit', version: '4.12'
testImplementation group: 'junit', name: 'junit', version: '4.12'
}

task sourcesJar(type:Jar){
Expand All @@ -25,3 +25,12 @@ task sourcesJar(type:Jar){
artifacts {
archives sourcesJar
}

// Define publication for maven-publish plugin
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}