Example gradle script to build(clean, build) several projects in the right order
By : MyRose
Date : March 29 2020, 07:55 AM
it should still fix some issue There are several projects that need to build in order. By build in order the meaning: , In your root build.gradle: code :
dependencies {
compile project(':project1'), project(':project2')
}
|
Reuse Gradle build script in other projects
By : fdezmc
Date : March 29 2020, 07:55 AM
wish helps you Is there any way to refer to tasks declared in my build-A.gradle from MyPlugin? code :
class MyPlugin implements Plugin<Project> {
void apply(Project project) {
applyFromClasspath(project, 'build-A.gradle')
}
void applyFromClasspath(Project project, String path) {
InputStream in = getClass().classloader.getResourceAsStream(path)
if (in == null) throw new RuntimeException("No such resource $path")
in.withStream { InputStream stream ->
File localFile = project.file("${project.buildDir}/MyPlugin/$path")
localFile.parentFile.mkdirs()
localFile.bytes = stream.bytes
}
project.apply(from: localFile)
}
}
void apply(Project project) {
project.with {
configurations { ... }
ant.echo(message: 'Hello')
}
}
|
Gradle Project Version from build.gradle via Shell Bash Script
By : Shruti Gupta
Date : March 29 2020, 07:55 AM
this will help I want to be able to grab the build.gradle version via a bash shell script that happens post build. How would I go about getting this? , The properties task can also do this. code :
./gradlew properties | grep ^version:
|
Automatic library version update for Gradle projects is currently unsupported. Please update your build.gradle manually
By : yona
Date : March 29 2020, 07:55 AM
will be helpful for those in need I have this in my building.gradle , Update the Kotlin version to 1.1.2-5: code :
buildscript {
ext.kotlin_version = '1.1.2-5'
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
|
Update TeamCity Build Number with version in Gradle build script
By : K.Gurva Reddy
Date : March 29 2020, 07:55 AM
hop of those help? I have a gradle build script as below: , Try replacing echo command with code :
println "##teamcity[buildNumber '${version}']"
|