[guardian-dev] building orbot

Hans-Christoph Steiner hans at guardianproject.info
Tue May 31 10:44:43 EDT 2016


If its possible to build with the existing build system, by only
switching the root commands library, that would be preferrable.  That
way we can keep the release build process, the Jenkins builds, etc. all
the same.

There can totally be a build.gradle setup in place there as well, while
leaving the old build system intact.  Then it can be edited using
Android Studio. Attached is a file that gets most of the way there.

.hc

Nathan of Guardian:
> Super. Migrating now to the chainfire libuser, and then should be back
> at a good build state with a new Gradle setup.
> 
> On Tue, May 31, 2016, at 10:17 AM, Hans-Christoph Steiner wrote:
>>
>> That's how this started for me :)  Once I can build Orbot again myself,
>> then I'll update the fdroid build recipe.
>>
>> .hc
>>
>> Vanitas Vitae:
>>> Hi!
>>>
>>> Could you also update/remove the Orbot version in the main FDroid repo?
>>> I guess many users still use the outdated version because they did not
>>> activate the guardianproject repo...
>>>
>>> Am 31.05.2016 um 15:37 schrieb Dominik Schuermann:
>>>> Hey,
>>>>
>>>> I no longer maintain RootCommands, better switch to
>>>> https://github.com/Chainfire/libsuperuser
>>>>
>>>> Cheers
>>>> Dominik
>>>>
>>>> On 05/31/2016 03:30 PM, Nathan of Guardian wrote:
>>>>> Seems to be related to RootCommands:
>>>>>
>>>>>     [dex] Pre-Dexing
>>>>>     /home/n8fr8/dev/repos/orbot/external/superuser-commands/RootCommands-Library/bin/classes.jar
>>>>>     -> classes-e333d1e194d94df7dc6c73ea3d62d709.jar
>>>>>        [dx] Exception in thread "main"
>>>>>        java.lang.UnsupportedClassVersionError:
>>>>>        com/android/dx/command/Main : Unsupported major.minor version
>>>>>        52.0
>>>>>
>>>>>
>>>>> Alright... time to dig in and update all these crazy old dependencies.
>>>>>
>>>>> On Tue, May 31, 2016, at 09:25 AM, Nathan of Guardian wrote:
>>>>>>
>>>>>> On Tue, May 31, 2016, at 09:10 AM, Hans-Christoph Steiner wrote:
>>>>>>>
>>>>>>> Nathan of Guardian:
>>>>>>>>
>>>>>>>> On Tue, May 31, 2016, at 05:05 AM, Hans-Christoph Steiner wrote:
>>>>>>>>> How are you building Orbot these days?  Do you need to use old versions
>>>>>>>>> of the SDK?  I can't get it going as it is in git.
>>>>>>>> I haven't made the update to Gradle yet, but it should build from Ant
>>>>>>>> still.
>>>>>>>>
>>>>>>>> Where is it failing? Are you using make-release-build?
>>>>>>> Tried using ./make-release-build and Eclipse.  Both are failing with an
>>>>>>> exception that seems to be something related to Java8, I think.  So my
>>>>>>> guess is that the ant builds no longer work with the latest Android SDK:
>>>>>>>
>>>>>>> [dx] Exception in thread "main" java.lang.UnsupportedClassVersionError:
>>>>>>> com/android/dx/command/Main : Unsupported major.minor version 52.0
>>>>>>> [dx]    at java.lang.ClassLoader.defineClass1(Native Method)
>>>>>>> [dx]    at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
>>>>>>> [dx]    at
>>>>>>> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
>>>>>>> [dx]    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
>>>>>>>
>>>>>> Okay will take a look today. Need to push out an Orbot update anyhow,
>>>>>> and perhaps it is time to go gradle.
>>>>>>
>>>>>> -- 
>>>>>>   Nathan of Guardian
>>>>>>   nathan at guardianproject.info
>>>>>
>>>> _______________________________________________
>>>> List info: https://lists.mayfirst.org/mailman/listinfo/guardian-dev
>>>> To unsubscribe, email:  guardian-dev-unsubscribe at lists.mayfirst.org
>>>
>>> _______________________________________________
>>> List info: https://lists.mayfirst.org/mailman/listinfo/guardian-dev
>>> To unsubscribe, email:  guardian-dev-unsubscribe at lists.mayfirst.org
>>>
>>
>> -- 
>> PGP fingerprint: EE66 20C7 136B 0D2C 456C  0A4D E9E2 8DEA 00AA 5556
>> https://pgp.mit.edu/pks/lookup?op=vindex&search=0xE9E28DEA00AA5556
>> _______________________________________________
>> List info: https://lists.mayfirst.org/mailman/listinfo/guardian-dev
>> To unsubscribe, email:  guardian-dev-unsubscribe at lists.mayfirst.org
> 
> 

-- 
PGP fingerprint: EE66 20C7 136B 0D2C 456C  0A4D E9E2 8DEA 00AA 5556
https://pgp.mit.edu/pks/lookup?op=vindex&search=0xE9E28DEA00AA5556
-------------- next part --------------
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.0'
    }
}

allprojects {
    repositories {
        jcenter()
        flatDir {
            dirs 'libs'
        }
    }
}

apply plugin: 'com.android.application'

dependencies {
    compile 'com.android.support:support-v4:23.4.0'
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.android.support:support-annotations:23.4.0'
}

android {
    compileSdkVersion 23
    buildToolsVersion '23.0.3'

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

    buildTypes {
        all {
            minifyEnabled true
            useProguard false
        }
    }

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
            jniLibs.srcDirs = ['libs']
        }
        androidTest {
            java.srcDirs = ['test/androidTest/java']
        }
        test {
            java.srcDirs = ['test/unitTest/java']
        }
    }

    lintOptions {
        abortOnError false
    }
}

/**
 * Improve build server performance by allowing disabling of pre-dexing
 * (see http://tools.android.com/tech-docs/new-build-system/tips#TOC-Improving-Build-Server-performance.)
 */
project.ext.preDexLibs = !project.hasProperty('disablePreDex')

subprojects {
    project.plugins.whenPluginAdded { plugin ->
        if ("com.android.build.gradle.AppPlugin".equals(plugin.class.name)) {
            project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs
        } else if ("com.android.build.gradle.LibraryPlugin".equals(plugin.class.name)) {
            project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs
        }
    }
}


More information about the guardian-dev mailing list